Log in

View Full Version : Music in Indy Games


elund
10-02-2002, 09:16 AM
What's everyone doing with music in indy games these days? I know there's still a lot of MIDI out there, but frankly I don't enjoy how MIDI music sounds. (With some exceptions -- I thought Marbles Deluxe (http://www.retro64.com/getmarbles.asp) sounded pretty good and I think it's MIDI.) And MIDI sounds different on each user's computer. MP3s are heavy, adding 2-5 meg to the download for each song you do. According to Steve that's a real barrier to potential downloaders. I suppose you could supply songs as an optional download for those who want to bother, but you still have the problem of supplying at least one song within your size limits of the intial download (<3 MB being preferred by Dexterity).

Do people think music is necessary for games? Or could ambient sounds be used to set a tone instead of a song, per se? Also, since many people have some MP3s on their machines, why not include an MP3 player instead? A user could configure a playlist for your game, so when the game plays, it plays their music instead of yours.

What do you think of the MOD format? It doesn't add a lot to the download size, but it's fairly CPU intensive on older computers. I notice StockBoy (http://www.dexterity.com/stockboy/) comes with a music composer but I haven't tried it. I kind of like the idea creating your own loops sequencer, or creating a song in something like Acid (http://www.sonicfoundry.com/products) and splicing it into repeatable sections. Fmod (http://www.fmod.org/) can play multiple layers of music files, making it easier to roll your own.

Finally, how many people here create their own music for their games, and how many contract out? I've dabbled in music for years, but every time I get down on myself and think this song isn't good enough for my game, I play some other game with a terrible score and feel better. What kind of agreements do you have with your musician if you have one? On the payroll, one-time fees, or royalties?

Mike Boeh
10-02-2002, 11:15 AM
Marbles Deluxe uses MOD music (impulse tracker .it). I really think there is no other soliution for small, good sounding music :-) FMOD, Bass, and GAudio are all good.

elund
10-02-2002, 11:26 AM
Well that explains why it sounds good. :-) Did you compose the song yourself? Do you have any users with older computers complain that the game is slow?

Lerc
10-02-2002, 02:21 PM
I use Mods. Games with Midi usually result in me racing to the options to turn it off.

Mods shouldn't take too much cpu to run. Fmod has a page where they list how much CPU their library uses here (http://www.fmod.org/fmodcomp.html) On the whole I don't notice a speed hit even when I was developing on a Cyrix 166Mhz machine.

I'm also tring to get the size of Mods down by storing all of the sample data inside them as Oggs. I've sent Brett at Fmod a Compressor to turn Mods into OggMods and he is going to try and have support for these new mods in Fmod 3.61 (fingers crossed).

As to how I got music. I downloaded huge numbers of mods and tried to find some that I liked and I could find the author. I then picked a selection of his already composed mods and made him an offer for the use of them. I doubt I could have afforded paying someone to compose music specificly for the game.

Hydroaxe
10-03-2002, 06:57 PM
Midi is a four letter word. It's like presenting all your games' graphics in green monochrome. We have surpased that low level of quality for many years. Mods can be great and are an excellent choice for electronic type music genres. Today I tried Mike's "Best Friends" game and the music fit perfectly. I really enjoyed it. It's a good example of how it can be done right. On the other hand, any poor composer can make a Mod sound as useless as a midi, so some people confuse the two.

For Pharaohs' Curse I wanted to use more organic instruments, so I recorded them in WAV and converted to MP3's, but I was tipped off to the Ogg format earlier in development. For example, one of the in-game tracks was 1070Kb in MP3 and in Ogg it compressed to 502Kb. That's less than half the size of an MP3. Mods are still much smaller than that and there are other factors, but what you choose should depend on your writing style, talent and how much space you actually need to save.

By the way, even if you did use MP3, you have to pay a license fee. If you haven't, you run the obvious risks. I think most independent developers use Mod, simply because of the small file sizes.

BrewKnowC
10-04-2002, 04:15 AM
Hi, just listening to all this talk about midis and mods and oggs oh my! Anyway i was just wondering if it was free to use mods and oggs in a commercial piece of software or if there were licencing fees? Thanks
BC

Lerc
10-04-2002, 04:55 AM
Mods are open formats and have been for years. they are not really complicated enough for anyone to patent (well shouldn't be anyway, but silly patents have been turning up these days).

Ogg Vorbis is a different story, It is much more complicated but it was designed with the specific notion of being a replacement for mp3 only without any patent or licencing issues.

svero
10-04-2002, 08:20 AM
I thought the music in marbles deluxe was really perfect. For myself I stick with MIDI for the moment and compose most of the music myself using cakewalk home studio and a mouse.

LordKronos
10-04-2002, 10:01 AM
For Miko & Molly I just used MIDI. Also, being a musician for a number of years, I have the luxury of having a variety of music software and (however old it may be) hardware . I use Cakewalk 6 and a MIDI keyboard. No mouse for me...well, except to fix my sloppy playing :)

However, for future projects i am seriously considering using MODs. Especially since I would like to take a stab at some of the more casual board/puzzle games (along the lines of bejeweled, collapse, arcade lines, etc.). Those game are a little more like relaxed fun, and the music kind of sets the mood. For a locic puzzle like Miko & Molly, there is a lot more thinking going on as you play, and I didn't really feel it was necessary to fill it with really high quality, dramatic music or anything...just something to remove the silence (but I like to think I did a pretty good job with the MIDI anyway).

BrewKnowC
10-04-2002, 10:03 AM
What do you guys suggest for fun puzzle type games? MIDI, MOD or OGG?

makeshiftwings
10-04-2002, 01:20 PM
Has anyone used DirectMusic? It's got a basic MIDI interface and small file size which is nice but lets you use samples to ensure the music sounds the same on all sound cards, regardless of hardware. You can also do some neat things like adaptive music and 3d effects. It does, however, require at least DirectX 7 (maybe 6?) and it is probably more CPU intensive than MOD, but I'm not sure.

svero
10-04-2002, 05:41 PM
I'm using DirectMusic to play our midi files but I don't use the instrument feature to enure compatibility from machine to machine. Again it's an issue of download size. After hearing the music in marbles deluxe I wanted to look into the mod formats so I checked out a number of popular mod trackers but I found that they were much harder to use than something like cakewalk. Perhaps I tried the wrong ones?

As for recommendations... well I think the music style and composition is probably a little more important than the format used. All have drawbacks and benefits though. Midi is tiny, but the quality sometimes is a little poorer depending on the soundcard. Something like a soundblaster audigy with soundfonts can sound really great with midi though and isn't really all that conceptually different than mod format. Mod is good because you get digital quality sound with small file sizes, but in my opinion it's harder to create music using mod format, and it's also probably a little more taxing on the cpu as has been mentioned before. The last two options, digital sound and cd sound both suffer because of the way our business model works. If it meant nothing to people if they had to download a 50mb file I'd probably use something like mp3.

elund
10-07-2002, 07:40 AM
I checked out the Bass (www.un4seen.com) sound library and I was impressed by the MO3 format. This is a format the lets you compress the samples (MP3 or Ogg Vorbis) in any mod-like format (mod, it, s3m, etc). The resulting file is decompressed in memory at runtime by the Bass music playback routines. Lerc mentioned that this kind of functionality might be added to the next Fmod (http://www.fmod.org/), but from the forums I read I got the impression people have been asking him for compressed samples for a long time. Bass is cheaper, $100 for a multiple product shareware license, but it's Windows-only, unlike Fmod.

Like Svero, I'd use MP3 if size wasn't a problem. I'd like to use Sonic Foundry's Acid (http://www.sonicfoundry.com/PRODUCTS/NewShowProduct.asp?PID=704) for song composition. I came up with an idea of rendering out the repeatable sections of a tune to wave files and dropping them into MOD. I find most trackers somewhat difficult to work with, so the idea was to just use MOD for sequencing. So I gave it a test this weekend. I created a tune in Acid (3 megs as 96k mp3) and rendered sections of it to wave files. I imported these gigantic samples (72 seconds worth) into Modplug tracker (http://www.modplug.com), and reconstructed the tune. I saved it as impulse tracker because that format allowed longer patterns to accomodate my longer samples. The resulting IT file was 16 megs (totally uncompressed). I ran it through the MO3 encoder available from the Bass site and used ogg vorbis with -q 0 to compress the samples. The result was a 3 minute mo3 file about half a meg in size. Then I wrote a program to play it using the Bass library. It sounds pretty good, actually. I don't notice much of a difference between -q 0 and the higher levels. The MO3 encoder lets you choose a different compression quality for each sample, so if a sample didn't compress particularly well, you could leave that one larger. I think if I play with it and loop wisely I can get the MO3 size down to 256k.

Even though the file is smaller, there is a memory footprint required to play the song and hold the decompressed samples, so it's still important to get the number of samples and average sample size down as much as possible. I really like the loops in Acid, it helps an amateur composer like me sound ... well, like an amateur composer who is using loops, but I think it's a good start. If I didn't enjoy playing with this stuff I'd probably do what Lerc did and make an offer to a someone who has already written a mod I like.

elund
12-25-2002, 04:30 PM
Originally posted by Lerc
I'm also tring to get the size of Mods down by storing all of the sample data inside them as Oggs. I've sent Brett at Fmod a Compressor to turn Mods into OggMods and he is going to try and have support for these new mods in Fmod 3.61 (fingers crossed)Fmod 3.61 (http://www.fmod.org/) was just released and Ogg Vorbis-compressed mod support (OXM) is in it. I'm looking forward to trying it. Thanks for Lerc for supplying the OggMod converter tool.

Nick Bischoff
12-26-2002, 02:04 AM
I am bordering on being tone deaf. :) Hence I cannot make any of my own music for my games. Does anybody know of any royalty free MOD(any tracker format) sites?

I was thinking of having a competition and asking several mod communities to submit their work (with the understanding of them giving me ownership) with a great prize as a hook. If I had to spend 100 bucks on a prize and get 20 good mods submitted then that is money well spent AFAICT.

Doesnt MO3 compress the samples as MP3 thereby bringing Thompson into the picture with regard to selling and distributing audio?

elund
12-26-2002, 07:20 AM
MO3 (http://www.un4seen.com/music/music_mo3.html) files from Bass (http://www.un4seen.com) can be compressed with either MP3 or Ogg Vorbis. The encoder supports XM, IT, S3M, MTM and MOD formats. It appears the OXM format from Fmod (http://www.fmod.org) supports Ogg and XM only.

I Ogg-compressed an XM (834k) into both MO3 (173k) and OXM (283k) at quality "0." The sound quality is identical to my ears. The MO3 encoder claims to also compress non-sample data, so this may account for some of the difference in file size. MO3 can also remove unnecessary text strings from the file, but the savings is negligible. Both formats will eliminate unused samples from the output; possibly the OXM encoder is more conservative in its definition of unused, contributing to the size difference? Neither Bass nor Fmod require code changes to play these files over standard mods.

Lerc
12-26-2002, 09:44 AM
When I made the OXM compressor I made the decision to compress only the Sample data. Anything else can be gained by Zipping. Nobody distributes a game without using zip or some similar compressor so you shouldn't lose any download size because of this.

Try zippping the OXM and the MO3 to see the final sizes where they count.

The other thing is that an OXM still looks like a XM to a standard mod player (only with scrambled sample data). The patterns are still editable. Some people requested this.

When it comes to doing other formats, I suspect it is only a matter of me supplying an encoder for each format to make it work for others. My encoder is designed to be expanded easily in this way.

Brett suggested using rehuff to reduce the size of the Oggs a bit more but I havn't managed to find a recent version of rehuff.

elund
12-26-2002, 07:31 PM
I thought your hypothesis was reasonable, but zipping the files didn't make up the difference. I tried a number of other XMs until I found one that neither MO3 nor OggMod seemed to be discarding unused instruments from. I came up with the following sizes:

XM 374k, Zipped 327k
OXM 92k, Zipped 52k
MO3 69k, Zipped 32k

I can't come up with a reason for these differences; MO3 compressing so well is especially quizzical. Don't get me wrong, I think it's great that Brett has added this compressed sample support to Fmod and appreciate your part in getting him to do so. The 327k-to-52k reduction is very cool.

alchemist
12-27-2002, 07:07 AM
How about a "Sound & Music 101" for those of us new to all these different formats?

MIDI I know by the 1980s-vintage sound, and .WAV or .AU are what I've used thus far -- I can sample them down until they're small enough but still sound okay.

MP3 I know just from the net and from my kids. :)

Oggs Vorbis (which sounds like a really cool name for an NPC) and MOD are unknowns for me.

I'm not a composer, and music is the last thing I'd try to create personally in a game. I found all the sound and music for Chrysanthemum (http://www.onlinealchemy.com/oaprojects/chrysanthemum/mum.html) at The Sound Effects Library (http://www.sound-effects-library.com/) (royalty-free), and have downsampled and tweaked them for my purposes. But for other games I'd like more music, and this means something with smaller file sizes, like MOD or the Greatsword of Oggs Vorbis.

Can anyone point me to good intro info on these formats, or provide it here?

Steve, there's probably a good article in "making sound and music work for you in your game." :)

elund
12-27-2002, 10:03 AM
Mods hark back to the mid-eighties, and I would probably credit the Amiga for making them popular. I think the first mod I ever heard was a near-perfect copy of the Bladerunner theme, and a far cry from Midi. Mod is the name of both a specific file format and a general umbrella for all mod-style music, which would include IT (ImpulseTracker), S3M (ScreamTracker), and XM (FastTracker II). A lot of "tracking" is still done in DOS. The name of the composition tool is called a "Tracker."

Mods differ from Midi in two major ways. First, instead of using the FM-synthesis or wavetable instruments stored on your audio card, the instruments (or "samples") are stored inside the mod file. This means the music should theoretically sound the same on any user's computer. Second, songs are arranged into patterns, and patterns may be sequenced together and repeated in any order. This makes arrangement easier -- if you know you want to repeat this part of the song 30 seconds later, you don't copy and paste, but rather just repeat the pattern in the sequence.

The different mod formats have different limitations and "effects." Notes, for instance, can be bent (portamento) from one key to another, or faded out, etc. The Tracker's Handbook (http://www.united-trackers.org/2000/reading/trackers_handbook/), although written in 1999, is a good overview of Mod music and the tracker scene. For a little history and quick overview, try this guide (http://www.united-trackers.org/2000/resources/reading/guide_to_mod_tracking/).

Ogg Vorbis is the open-source answer to MP3. It's the same functionality (lossy but highly compressed audio), but utilizes no known patents. It's just a lovely way to tell patent mongers where they can shove it. Ogg files typically use the .ogg extension. Oggs are great for storing music and sound effects. The discussion here has centered quite a bit on "compressed mods." Standard mods store the samples as raw audio (e.g., wav) and this can make them bloated. This is especially true when you consider using prefab loops (i.e., Acid (http://www.sonicfoundry.com/Products/showproduct.asp?PID=704)) instead of small-in-size single instruments files (usually named .XI). Compressed mods are mod files with the sample data compressed, and are therefore a lot smaller than regular mods.

A good Windows tracker to start with is ModPlug Tracker (http://www.modplug.com). The tracking subculture is huge, so you can find demo mods pretty easily. If you want to do tracking yourself, you'll need to get instrument files or record your own. If you just want to listen to them, there are many mod players out there, including WinAmp (http://www.winamp.com). Both Bass (http://www.un4seen.com) and Fmod (www.fmod.org) are capable of playing back Ogg Vorbis and a variety of mod formats. They each have their own method of supporting compressed mods.

Kai-Peter
12-28-2002, 04:03 AM
Thank you Elund!

Even if I grew up when SoundTracker was the best (and only) tracker available that still opened my eyes. Nice to hear such a coherent overview!

alchemist
12-28-2002, 04:23 AM
Yes, excellent overview Elund. I assume too that most of these systems have easily integrated APIs for playing music from within a game?

elund
12-28-2002, 08:05 AM
My pleasure. :D

It's very easy to kick off mod music in both Fmod and Bass. After you initialize the system...

... in Fmod (http://www.fmod.org):

FMUSIC_MODULE *song = FMUSIC_LoadSong ("filename.mod");
FMUSIC_PlaySong (song);

... in Bass (http://www.un4seen.com):

HMUSIC song = BASS_MusicLoad (0, "filename.mod", 0, 0, BASS_MUSIC_LOOP);
BASS_MusicPlay (song);

The filename can be any kind of MOD or a compressed mod (OXM for Fmod and MO3 for Bass) and it will play looping. To play Ogg and MP3 music, you'd have to use each system's sample-management functions.

alchemist
12-28-2002, 08:41 AM
cool beans. thanks.

John Cutter
02-13-2003, 10:54 PM
Does anyone have any experience with "Windows Media Audio" (.wma) music? Is this a viable format for shareware games?

The latest version of Goldwave, my [budget] audio program, outputs in .wma and I'm pretty pleased with the results. I just converted a 3.5 MB Carpenter's .MP3 into a 500K .WMA file and it sounds pretty good. (Better than I expected.)

pallavnawani
02-14-2003, 12:45 AM
WMA is Microsoft Modified Version of AAC (Advanced Audio Codec (Mpeg2 Audio Format)). It offers better quality and compression than Mp3 (AAC was better than Mp3 anyhow, and WMA is better than AAC).

However, OGG and RealAudio8 are both better than WMA (Despite Ms claim to contrary).

One Tactics Ms uses in WMA to sound better is that they boost the volume by 3db. So it appears to sound better! If you equalize the volume, you can make a much better comparison.

John Cutter
02-14-2003, 01:38 AM
I'm using a development environment that can (easily) play .wav, .mid, .mp3, and .wma music. Other formats are much trickier.

Is the .wma format free? I haven't had any luck finding this out yet. My biggest concern, though, is compatibility. Will people need a codec that they might not have on their computers? I'm trying to keep my system requirements way down, so this is an important issue for me.

pallavnawani
02-14-2003, 01:58 AM
Originally posted by John Cutter

Is the .wma format free? I haven't had any luck finding this out yet. My biggest concern, though, is compatibility. Will people need a codec that they might not have on their computers?

Most likely not I never tried to check ( But Try microsoft's website, that's a better place to find out). Compatibility is definitely very low. WMA codec is distributed by MS with their Media Player software (Newer versions). You can get WMA playing versions of Winamp too, but those are very (relatively) new. This codec really bacame known within last 2-3 Years, so I imagine very few of older computers will have it.

Although I guess If wma codec is present on a system you can use it without problems. Ms gives it away just like IE or Directx.