One of the lessons in my Intro to Game Audio course uses pre-existing music as the basis for some music edits. I provide links to both an audio file and a midi file of the same music. Frequently students will want to use the midi file and then re-realize the instruments for the edits. That can be a much cleaner way of making an edit because you don’t have to worry about reverb tails hanging around or pickup notes or other very musical moments that are captured permanently in audio.

How do you know you are using a MIDI file as opposed to audio? You can tell you are using a MIDI (Musical Instrument Digital Interface) file because in most cases the file will have an extension of “.mid” or “.smf”. That last one stands for Standard Midi File. You can find out all you ever wanted to know about MIDI from the organization that invented it, The MIDI Manufacturers Association. *As a side note the musical pieces are from the Grim Fandango score which I spoke of in an earlier blog (of course!). A MIDI file only contains  a set of instructions. These instructions relay information to a sound producing device, like a synthesizer or sampler, about playing notes. We sometimes forget this because most modern computers will actually create sound automatically from a MIDI file. Click on this link and your browser likely will start playing music! In my browser I get the familiar QuickTime transport bar and if I click on the info triangle at the right I get this :


QT midi file playback

What exactly is happening? A few things are at play here. Yes, I was correct when I said a MIDI file only contains a set of instructions. It isn’t the MIDI file, per say, making those sounds but rather it is the browser plug-in that is creating the sound. I just happened to set QT as the default helper application for playing MIDI files from my browser. Let’s take a look at how that happens. If I go to my QuickTime settings in the System Preferences pane and click on Advanced, this is what I see:


Quicktime Control Pane

Notice it states that the default synthesizer is found in QuickTime. What that means is that, when a MIDI file is played, from within any standard operating system procedure, the instructional notes/information will be translated to audio via this thing called a QuickTime Music Synthesizer. This is a key point and it explains just how a MIDI file can make sound from a browser. I apologize to those of you that do not have much experience working with MIDI, I’ll tackle that at another time, as this is really meant to provide answers on how to play these files in a DAW/Sequencer. So we know we can play a MIDI file  in a browser, yippee! but how do we use those darn things in Logic?!@# ?@#$^ or DP or PT or any other sequencer application?

First, perhaps, we should consider that when I play that MIDI file in my browser, I hear sounds that make sense for the piece of music. I hear strings, I hear clarinet, I hear an acoustic bass. It is not a coincidence that the correct sounds are played by the correct MIDI track. Just how is that possible? The magic of a MIDI file is that it is meant to be transportable to many systems, it includes not only the note on/off information, but it can also include an indication of what “sound” or “instrument” should be playing those sounds. This is known as the General MIDI spec. When I grab a MIDI file that has been written with the General MIDI spec in mind, it not only has the note on, note off information expected in the file, but it also includes which instruments should be playing each track. Here is a look at a Logic Pro session after dragging and dropping the Grim Fandango MIDI file onto it.

SMF in Logic Track List

Notice that each track within the MIDI file includes an indication of the “instrument/sound” that should play the notes indicated in the track. The top track, called “Grim Fandango” has “45″ as a program change. If you look at the General MIDI specification that defines soundsets you will see that any MIDI file written to follow the GM spec has 128 named instrument sounds that the file can use. That is to say, by following the GM guidelines the composer understands that the above file will play the instrument type associated with program change “45″. If we go into our event list we can also see that Logic has associated a PROGRAM CHANGE 45 with pizzicato strings. Make sure you are not filtering the view to exclude program changes, in this screen shot, “Additional Info” is toggled to be hidden, everything else is seen. ***please see the footnote on GM program change number formatting at the bottom

Logic Event List MIDI program changes

The nice thing about embedding the Program Change into a track is that any GM compatible device playing it will produce the sound of pizzicato strings. This is wonderful if you are developing games for mobile devices etc. that can not play audio files directly. For the assignment though, that program change can really mess things up! Why? Simply because no matter what the device you point that MIDI track to, the first thing that will happen is the device will switch to Program number 45! That’s fine on a GM patch bank, but it you are using Kontakt or Reason or any other MIDI instrument, program 45 may not be the sound you want, and indeed, chances are you already picked a great pizzicato string sound and every single time you hit play on your sequencer it takes your patch away!

This happens to many of my students both on campus and online. So, back to the reason for this blog. How do you use MIDI files with these program changes in your sequencer? If you are intending to trigger a GM device you only need to make sure to use a GM bank of sounds. Almost every synthesizer I’ve ever used has at least one bank that states it is GM compliant. If you want to play around with unique sounds for each track, ones that you pick from your thousands of patches, then you need to delete the program change at the beginning of every single MIDI track.

That’s it. So if you’ve ever experienced your sound modules/synthesizers, etc. “acting crazy” and selecting weird sounds, my guess is there were embedded program changes. Once my students start to understand that, believe it or not,  they also start to understand MIDI a lot better. MIDI is still a powerful tool in your productions…. but that is also for another blog…

***Why did I tag the above statement about the program change numbers?  Well, as is true in most facets of life, not everyone agrees on things that seem straightforward and obvious. In the case of MIDI numbers there is a debate about what numbers to use to indicate the program number to the user, some applications use 0..127 while others use 1..128. If you look at the GM sound list I linked to it is numbered starting at 1 and says that number “46″ should trigger a pizzicato sound. The Logic session starts the “decimal system indication” at 0, thus it is “45″ that triggers the pizz sound. For the end user, you need to know which numbering system your DAW uses. DP numbers from 1..128, PT numbers from 0..127. Realize that the sequencers have it figured out from the true binary that is used, only us humans have these competing ways of representing it!