iDevGames Forums
In-Game Midi - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Designer's Studio (/forum-6.html)
+--- Thread: In-Game Midi (/thread-6998.html)

In-Game Midi - Justin Brimm - Jun 19, 2003 03:11 AM

With some practice and trial & error, you can actually use Quicktime Instruments to create some pretty good music. I have some questions about it though; since it sounds the same on many different computers, I'm led to believe that Quicktime Instruments unlike other Midi generators, does not rely on the soundcard for quality. Am I right in that assumption?

Also, if QT Instruments doesn't rely on the soundcard, does it take more processing power to run it in real-time, or to record it and run it in another format? If it does rely on the soundcard though, it'd have to be recorded anyways to ensure that what I hear is what others hear.

In-Game Midi - OneSadCookie - Jun 19, 2003 03:26 AM

What sound card?

In-Game Midi - Justin Brimm - Jun 19, 2003 03:32 AM

The one punched into the motherboard? I don't know... so I take it, QT Instruments sounds the same on all computers. Now, is it better to run it as midi in-game, or to record it and play it in-game as another format?

In-Game Midi - Greg Gant - Jun 19, 2003 06:31 AM

Time for a crash corse in Midi and gaming audio:
I'm tired, intoxicated and late as hell (just got back from an end of year bash). Expect to this post to filled with typos.

Midi relies on a GM soundset, hence General Midi, a base soundset that is mapped out in the midi standard of which particular instruments indentified certian order. Midi is a fairly ghetto technology dating back many years when Sample banks were hardware related, thus a standard instrument set was created for easy sharing. A number 1 through 128 was mapped to the default midi bank, which all Midi sound banks should contain.

For instance, instrument 1 should always be a Grand Piano.
Instrument 57 should always be a Trumpet
Instrument 74 should always be a flute etc.

Anyhow, if one took midi data, he/she could use this with any sample bank and play it back with roughly the same instruments although soundbanks can different based on the samples they playback. So on keyboard brand A, the flute sounds much crisper and more detailed, and Keyboard brand B, the flute is muffled and lousy and sounds like it only uses one sample.

Anyhow, 128 provided issues thus to maintain complancy the Genernal Midi, hardware makers would allow GM devices to substitute different instruments to each number. Say I have fancy keyboard but I don't like the Violin for the piece I'm working on, I can change the instrument tagged to the Violin number 41.

Then other companies altered the GM spec with their own devices so they could get around the crappiness of GM, such as with XG which expands 128 to 717 (and includes some basic DSPs that are performed within the soundbank).

So anyways, the old old method for gaming audio was FM Synth which gave you very synthetic limited sounds that could be only generated not recorded. As technology advanced on the PC, soundcards started providing crappy hardware level soundbanks (remember, this is in the stoneage when computers weren't fast enough to play a sample lib on the computer itself). Game makers music now had basic instruments although still lousy. As soundcards got better, the size the GM libs increased from like 1 meg to 2 megs and likewise. To keep the size down, often on old sound cards some of the GM instruments were lousy quality and some substituted with others. Thus buying a new sound card often meant your Midi soundbanks was increased with often better quality samples and more instruments. Game music would literally sound better when you upgraded your soundcard. Also Creative later provided Game makers with increased audio libs as well, outside of the GM spec which added to randomness of game msuic.

As fate would have it, the Midi banks stayed on the hardware even tho' computers became fast enough to play music with Midilike pre recorded instruments (fully pre-recorded tracks were too big). The Mac never had sound cards nor the hardware sound banks used for games thus for a long time Mac games often lacked music (Ever wonder why?). Around 1990 something Mac devs got around the lack of Midi hardware sound banks by including there own Sound libs like in Lucas arts games From Indiana Jones series, to Dark Forces and so forth.

Anyhow, to meet the multimedia demands of the consumers Apple released a General Midi Sound bank in QuickTime. It performed the same function as hardware level sound bank but resided entirely in software. They never payed much attention (as I recall, its only really been updated once or twice where instrument selection increased) to it but it suddenly meant any midi on the Mac would sound the same on every Mac since everyone was using the same sample bank (Although it is possible to route Midi to external hardware). Even then, games like Wolfenstien 3D still opted to use customized soundbanks.

Finally game audio came to the point where Midi was out, and CD audio was in or various advancements like MODs and what have you replaced midi thus died the era of Midi game audio.

Anyways, Midi takes up mild CPU usage. We're talking so little I wouldn't be concerned at all seeing Mac games have been doing this for around about 8-9 years with games like Indiana Jones and Temple of Doom and a few before that without Quicktime in Pre-PPC days.

The Quicktime Midi Sound bank is only avaliable if the user installed it but as I recall its installed by default.

Anyways, this is about 95% accurate. You can quote me on most of this although a fact here or there might be off. I guess thats a good as you're gonna get because I don't know of any other Audio editors for any other Mac gaming publications Rasp

In-Game Midi - Justin Brimm - Jun 19, 2003 10:42 AM

With enough tweaking of all the variables, you can make almost any instrument in QT Instruments sound real (or at least damn close), and if it uses so little cpu time (compared to playing a pre-recorded track), why have we seen the death of it in gaming on the Mac, or even for just shareware, where hiring an entire orchestra is out of the question? ...or is the use of QT Instruments not dead at all?

In-Game Midi - Carlos Camacho - Jun 19, 2003 06:25 PM

Good post Gregg. Do me a favor and send it to William Reade. I'll like to turn it into an article with a bit more polish. Good stuff though.

The QT instruments that Apple used in Mac OS 9 (and 8?) where created/licensed by Roland if I recall. I am unsure about the "Soft Synth" in Mac OS X. Overall, those QT instruments weren't too bad, but not as good of course as many PC audio cards. Thus I think that is why MIDI in Mac games was never huge. Frankly, now that we have a better core in Mac OS X, and Apple owning Logic, they should improve the QT instruments. But I do think there is much more under the hood for programmers in QT, so perhaps I am behind a bit. There are 3rd party "Soft Synths" made by Roland/Edirol and Yamaha. They sound very very good. Also, some higher-end" Soft Synths from software companies have been out for some time. They can rival many hardware based synths. In the end, making "better" MIDI standard on all Macs is not ad public-eye catching for Apple I think, so they have left it to 3rd party makers.

It would be good if someone made a great open-source (err "free") soft synth that could be installed with a game. And other games could use it, provided that the user selected that synth in their control panel.


In-Game Midi - Greg Gant - Jun 19, 2003 07:45 PM

One reason QT Midi didn't catch on is partly you had to use Quicktime. Remember Doom II? It had ungodly requirements at the time because it had to load Quicktime as well. These days, its no problem

In-Game Midi - Justin Brimm - Jun 19, 2003 08:34 PM

I like that idea Carlos, of creating an open source midi "soft synth". To get it started however, we would need to give the community a push, maybe by showing them the benefits. The other question is where to start? How would you go about even creating a soft synth?

In-Game Midi - Frank C. - Jun 19, 2003 11:05 PM

I'm all for a free "Soft Synth", but for it to be any good it has to contain high-quality multi-sample instruments - that's not likely to happen for free, unless someone with an spare orchestra and a $20K microphone is real bored and feeling generous one weekend Smile But even then it would lack post-processing (i.e. reverb).

Have ya'll forgotten about MODs already? MikModLib and PlayerPro's MADLib are both embeddable, and give absolute reproducible results since the samples are stored with the song data - no chance your fancy custom patches will get accidentally replaced at runtime. I don't think any mod formats currently support multi-sample instruments (do they?), but some creative composition can overcome this; e.g. You can sample entire bars played live or through a high-end MIDI patch and piece them together in a MOD after the fact, using shorter/stock samples for less prominent parts.

In-Game Midi - Carlos Camacho - Jun 20, 2003 12:56 AM

Oh, I didn't forget about MODs.. I just forgot to mention them. Smile

I agree that the acoustic instruments would be tough, without lots of help to record.

In-Game Midi - Greg Gant - Jun 20, 2003 05:33 AM

Who's William Reade? I forgot to ask.

I can edit that post for an article but right not for the next few days, gotta travel back to my parents house this weekend but I'll be back at my place here in Eugene Mondayish.

In-Game Midi - Justin Brimm - Jun 20, 2003 08:34 AM

Couldn't we possibly collect all the samplings we would need, through community support? Try to find some (if any) (semi-)professionals who would be willing to donate some of they're time? Find ordinary people who are half decent at some intruments to donate they're time? As for access to a place to record, that's not as hard as it sounds, although I'm not sure about prices.

Really, it would come down to anyone who's willing to lend a hand or a buck. I'd like to see this project get off the ground, to provide a decent, free, open source alternative to other "soft synths". I don't think there is too many shareware developers who can afford a symphony orchestra, or even some of the better "soft synths". Even if they could afford the latter, they would have to resort to recording it; in a program that's already pushing the computer, the extra strain put on by playing a prerecorded music track, rather than the alternative, could push it into the dreaded, choppy framerate.

If they had access to a good, free, open source soft synth however, they could just install it with their app, and be able to play the music in-game, without having to record it. Of course, it could always be said that they can just use Quicktime Instruments, but as was said earlier, it's unlikely it will see too many more updates, if any, and may suffer a slow painful aging death.

But then we come back full circle to how we're going to record all the instruments for the sound bank, to begin with.

In-Game Midi - Greg Gant - Jun 20, 2003 10:13 PM

Well I have made some of my own Reason patches, from recording my Yahama PSR-540 so I could donate those but really, making your own lib won't do any good unless you have a soft sampler like Reason to create your own "rendered" music or muster up one hell of code to play "Midi" through your own sound bank.