🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

MP3, Wave or conventional Midi?

Started by
5 comments, last by SuperSlow 22 years, 2 months ago
Even with the new sound cards that decode the mp3s on board, is it reasonable to have the background music playing midis? Or is that too much processing to decode? Should it be a straight uncompressed wave buffer, or should I just stick with the conventional midi synth. Also is there any pre-built library to load mp3s and play them, or does anyone have a link of the algorithm to decode the mp3? 2001 Bright Rally Red Camaro SS 2001 AMD Athlon 900 Thunderbird
2001 Bright Rally Red Camaro SS2002 AMD Athlon XP 1800+ Thunderbird
Advertisement
As far as your decision making goes, it really comes down to whatever you want to implement, and the system needs you will have to accomodate.
www.wotsit.org has plenty of info and a littel source code on mp3 decoding.
www.un4seen.com has a free/shareware sound library you can use. Lots of people like Fmod as well.
Instead of MP3, you could always use OGG Vorbis. For that, there''s a free (and portable and opensource) library for encoding and decoding at xiph.org. I''m personally using OGG Vorbis since it''s easy to do, has high quality and small filesize, and is free of the patents that the MP3 format has.

I recently created a little fun music app called The Music Toy (free download available at http://www.phildevault.com/musictoy.htm). It has minimal graphic motion to it, but plays 9 stereo .ogg files at once using the Fmod engine. It requires a 500 mHz processor minimum. So, you can figure 50 mHz of processor speed per stereo .ogg file (average bitrate 128) playing. As a composer, I''d always prefer .ogg or mp3 to midi given the limitations of midi.

Phil
midi is not as limiting as you think and allows music that can be changed on the fly. things like changing tempo, style, instruments, drums, add instruments, remove instruments, mixup patterns, blend music, etc. you cant do that stuff using static formats like mp3 or ogg. try using mod or midi. mod is preferable since it uses samples, and you dont have to care about how good the synth is. see directmusic for some info on the benefits of using midi with directmusic. though if you are looking for static background music, i say go for mp3 or ogg. mod and midi are only useful for non vocal dynamic music. though with static music and minimal vocals, mods and midis are still good and can be smaller then oggs or mp3.
You can try Amp11Lib. It''s a freeware mp3 (and other MPEG audio formats) decoding library.

http://marvin.cc.fer.hr/~elf/amp11lib/

It''s actually a wrapper for Amp11 by Niklas Beisert. I think he worked on Serious Sam... but I can''t remember. Anyway, it''s fairly easy to use and worth a look.
--------------------------{ Arena: Resurrection, my text-based RPG/Mortal Kombat-like game }{ A Look Into The World Of Arena II, a collection of short stories about characters in Arena II }
Expect the dynamic ability of MOD based music files to increase in the near future. The same dynamic effects are available, it just takes a bit more consideration on the part of coders. The more arguments I hear about why 1) MIDI isnt as limited as it used to be and that 2) MODs are somehow a relic of the past, the more I start to think that they are approaching the same boundary. Now more than ever, its really a matter of personal preference, because to use either of them to a highly dynamic level takes some consideration and customization, and to implement either of them in a simple and nondynamic fashion nets you comparably basic, limited results.

This topic is closed to new replies.

Advertisement