Advertisement

Midi vs. MP3

Started by January 23, 2002 09:35 AM
33 comments, last by skreuzer 22 years, 9 months ago
Hello, I am currently working on a game as a hobby, and I have come to the point where it is time to write music into the game. I was wondering if Midi had and advantages over MP3, or vice versa, and has anyone used mikmod, and if so, is there a windows version of the code. (Unix and Macintosh exist) Many Thanks SK skreuzer@mac.com
as far as i know: midi is bad, mp3 is real music, midi has just an instument and just does peep! use mp3! you can find help in the sdl libraries- > www.libsdl.org! search the page!
"be fair! ... always"Zeusel
Advertisement
Well, the obvious advantage is speed. MP3 requires a pretty heavy decoding algo while MIDI is pretty straight-forward. But then again MIDI output depends on your soundcard and may come out different on other machines.

I personally prefer MP3 because the soundquality is way better. MIDI is the worst invention since conventional memory!!!

In my latest game i use streaming WAVs and it works pretty good. But those WAVs are HUGE!!!! The game itself is about 50-60megs while the music is around 400megs. Fits perfectly on a single CD.

"Now comes the mystery."

Last words of Henry Ward Beecher
--------<a href="http://www.icarusindie.com/rpc>Reverse Pop Culture
Could we have some balanced discussion please?

MIDI advantages: small size (typically < 100KB), free of patents, minimal CPU usage
MIDI disadvantages: sound quality dependent on quality of sound card (or external instrument), difficult to incorporate non-standard sounds.

MP3 advantages: near cd-quality sound, sound quality invariant regardless of sound card
MP3 disadvantages: encumbered by patents (consider Ogg Vorbis instead), large size (typically 3 to 5 MB), lossy/introduces audio artifacts, high CPU usage during playback.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

Edited by - Kylotan on January 23, 2002 4:04:28 PM
quote: Original post by Kylotan
Consider Ogg Vorbis instead

I agree .

umm, you guys to realize that with directx comes a software wavetable which is quite good quality. since you did bring into the discussion of mikmod (which does mods not midis) might as well add them into the comparision:


WAV:
Advantages:
1. Best sound quality.
2. very little cpu usage.
3. trivial to play without any libraries.
4. sample accurate seeking
Disadvantage:
1. quality comes at a price, large size (about 10 meg per minute of audio). while you can reduce this, you will lose quality.

MP3
Advantages:
1. Near cd sound quality
2. size is better then wav (about 1meg per minute)
Disadvantages:
1. lossy compression
2. decoding requires more cpu then a wav file
3. more complex format means an external library will most likly need to be used (like sdl, directshow, etc.)
4. patent problems


Ogg Vorbis
Adavntages:
1. similar size to mp3.
2. no patents
3. mulitple channels (more then 2).
4. sample accurate seeking.
Disadvantages:
1. cpu usage
2. lossy compression


Mods (s3m, it, mod, xm)
Advantages:
1. size, can be smaller than mp3 or ogg vorbis.
2. ability to include special "timing notes" for special effects and other timing things. (demo scene used to use mods exclusivly for this sort of thing)
3. transition of style is possible by overlaying alternate drum beats, changing instruments but playing same notes, changing tempo, "shuffle" notes to get varitions for songs which are looped for a long time but are reletivly short.
4. more then 2 channels
5. can use mp3 to compress samples (only certain mod formats/players) or go with wavs.
6. quality can be then mp3.
7. free trackers availible.
8. no patents
9. probally the most mulitplatform sound format (amiga, pc, macs, etc.)
10. created for demos, so its well suited for multimedia applications.
Disadvantages:
1. any singing will greatly impact files size if the lyrics are not too repetive due to format of saving notes that impact samples.
2. cpu usage can be pretty high if many channels are used with many effects and interpolation of samples is used. though hihg quality interpolation probally wont be needed if using high quality samples.
3. a library would probally be needed to play them, (mikmod, modplug).
4. may be more difficult to create mods since you have to use midi instruments or do the notes by hand.
5. not all mod libraries play all mods the same, not a big problem since you would test yoru song with the library you choose. just thought i would mention it.
6. everyone has access to your notes/samples to your music unless you excrypt or use your own format with the same idea (ie playing notes by modifing samples).



Midi:
Advantages:
1. size, the smallest of the bunch.
2. muliple channels (more then 2)
3. low cpu usage if played via hardware (most cards support midi playing).
4. software wavetable support for cards that dont support good midi playback (this can be done via directx or other libraries, in fact windows itself can be set up to use a software wavetable for ALL midi playback.).
5. change instruments while playing to jazz up the sound, you can also modify the notes being played, add beats and remove melodies quite easily.
6. DirectMusic api makes transition, note shuffling, overlaying beats/melodies, style changes, etc. pretty straight forward.
Disadvantage:
1. without a good soundcard with a hardware wavetable, sound quality can be quite poor.
2. using the software wavetable means better sound quality, but at the cost of cpu.
3. limited sound banks, and much more difficult then mods to use custom samples.
4. any singing would require playing sound in some other format while the midi plays.
5. directmusic if used is windows only.
6. everyone has access to your notes unless you encrypt the data.

this was all off the top of my head, so please fix errors that you see. i personally woudl look into using mods or midis. really depends on how you create the music though.
Advertisement
you know, people always rag on MIDI, but they can be quite versatile, and with the right programs cant be VERY excellent sound wise.

Almost anybody who has used the Yamaha sound Synth that came with FF7 and FF8 for the PC can see where im comicg from.

MP3 is good, but can be quite slow in some areas.

All sound formats have their advantages, but they have disadvantages too. Just use what ever would be best for the sound you are going for
"Luck is for people without skill."- Robert (I Want My Island)"Real men eat food that felt pain before it died."- Me
What is up with MOD anyway? I read somewhere that the quality of sound and flexibility were good, but they haven''t come out with very musical editing software yet. Then again I read that about a year ago, is there anything out there yet?

DRINK GIN! IT MAKES A MAN MEAN-milk and cheese
DRINK GIN! IT MAKES A MAN MEAN-milk and cheese
I think MIDI are the best choice. MP3 kills your FPS and depending the way you do is illegal. MOD,S3M, are somewhat limited, MIDI with DirectMusic are far better.
DirecMusic ensures that the music will play equal on any machine, and u can get some other song librarys and ditribute with you game.
I think by ''no musical software'' is that it''s not displayed as a standard score, like most ''serious'' musicians understand it. Instead, it''s like:

C-5 .. ...
C#5 .. ...
... .. ...
D-5 .. ...

etc....you get the general idea. it makes note entry a hell of a lot easier, though Especially if you don''t read music...

This topic is closed to new replies.

Advertisement