MIDI files

Started by
6 comments, last by GameDev.net 24 years, 7 months ago
I know that not everyone has EMU Sound Fonts, but it may be worth looking into. Sound Blaster AWE sound cards come with a couple MBs dedicated to storing Midi Banks called Sound Fonts. It comes with a program that lets you create your own Sound Fonts (by importing wavs) and a program that loads them. You can code your software to trigger the loading of different Sound Fonts.

I know you probably won't want to go out and
by a new sound card, you might want to look into low quality digital formats such as .mods and .s3ms

|
|/
|evin Clancy
Advertisement
Several suggestions come to mind.

MOD files are a great way to include audio into a game. But creating them can be tricky. You'll either have to download a bunch of instrument samples or you'll need to record your own from the synth. Both methods generally take a while. In addition, you'll need to look for a MOD tracker that supports input from a MIDI synth, or you'll have to track everything with your compter keyboard.

Another method for incorporating music would be to record your music onto an audio CD. This is the method I prefer, but can be costly to set up the equipment to be able to do that.

Lastly, there's the MP3 format. Unfortunately, it's quite a CPU hog thus far. I've not seen it implemented in a way that didn't cause a slight drop in performance on a Pentium machine, and considering it'd be sharing CPU time with the rest of a game's functions, that wouldn't work to well. I have spoken with people who were convinced they could write faster, more efficient MP3 players for use in games, but I don't know if that's actually been done yet.

[This message has been edited by MetalFox (edited July 16, 1999).]

hi,
what about DirectMusic which is pushed by MS all the time. I've played around with it in the SDK and it seems to be an interesting solution. Those files are very much like MIDI but AFAIK the samples are included in the file so it sounds the same on all computers. Since it's part of DX 6.1 you don't have to care for the player and it is even possible to change the music dynamically.
I don't know how to create these files, but there should be an editor included in the SDK.
ciao...
...jens
DirectMusic is a good idea, but still hogs the proccessor like MOD and MP3. That's because it's only working in software right now. Somewhere I heard it was based on SoundFonts, but ironically no SoundFont supporting cards support the DownLoadableSounds (DSL.)
It'll work, but only if you're doing something 2D.
Direct Music is not a CPU hog, but it does have the potential to be. And that's mainly because Direct Music can play anything from Midi's to Mp3's. So it depends on what you plan on doing with Direct Music that makes the diffrence in how much it hogs up a CPU. If you create a 10, 5min MP3's and load them on startup of your game it's going to hog some serious CPU time. On the other hand if you load a 30 sec MP3 and loop it, it's not going to nearly take up that ammount of CPU time. Now let's talk about some of the other formats DirectMusic supports...Midi is the best because we all know what it is. On my last project I loaded about 8 individual Midi's on startup and played them all at the same time with direct music on a 486 DX/2 66 with 4 megs of memory and a 1 meg videocard, and have no noticeable drop in either FPS or responce time. "Direct Music is too much of a CPU Hog" is just a generalization, it's like saying "I don't like trees because I climbed one when I was a kid & fell out".
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
Guess that means my system's getting old (or maybe it's my no-name motheboard that doesn't understand "off.")
Anyways, I have found soundcards that support DLS, and most are based on Yahmaha XG. Yamaha has an semi-expensive (c.$200US) one but Guilemont (sp?) is planning on releasing one around $50 next year. It's supposed to have fancy SPDIF I/O and EAX, but plans can change. Still, you could use one to do your DirectMusic work on.
Well, I guess I'm off to futz around with my setup again.
I am working on a game and as part of it the music. I use Cakewalk to write midi tunes, using the midi voices on my Yamaha DB50XG.

Playing a midi file from C++ Builder is no problem, but because I am using midi the tunes sound different on different machines depending on the voices available.

Any advice on how (if possible) to put my compositions in a format that will sound the same on different machines.

Alternatively, any suggestions on how to better approach the subject would be equally appreciated.

I prefer to use XM file format. It can have a quite good quality and players doesn't waste cpu too much (Midas Sound System is very good one). Also, if you are looking for a tracker, take a look at ModPlug Tracker
www.castlex.com/modplug/home.shtml
It have many build-in samples and easy to use.

This topic is closed to new replies.

Advertisement