issue #8

Midi Composing 2

By 19Day

Part I of the MIDI series is in Issue 7

(If any of you find this tut useful, do me a favor and write me a 3D Studio Max R2 tutorial, I wanna make my own cutscenes and stuff for MazeRPG.)

When I left you last time I had just finished explaining the basics of Midi creating, using WinJammer. Hopefully, you have been experimenting with Midi's and trying them out on your friends. If you want to send a sample my way, although, not for critique, I don't usually feel right telling someone thier peice of music isn't good, because it's all subjective, but if you want me to hear something or have a specific question, you can always ask a question of me through QB:TM or email me directly at


Download WinJammer!

Now, I'm just going to go off on a tangent here, I'm going to explain what you can do with your experimental midi's after you've made one. The only QB midi playing lib out there right now is QMIDI, and I'll briefly describe a few of the quirks with it.

First of all, I use QMIDI 3, as QMIDI 4's stuff doesn't like my ultra new sound card, so all my instruction is involving version 3, which is basically the same as 4, with some small differences.

First, you need to load the driver. The driver is what hooks every- thing up and it's name is SBMIDI, if you try to use QMIDI without this driver, your computer will do very naughty things. Now, for the extended functions like PAUSE and stuff, you have to load SBSIM after you load the driver. But since I don't particularly care about pausing, I don't load SBSIM, it just wastes memory.

Now, what you have to do is make an array to hold the music, and then load the midi into that array and then play it, it's pretty well explained in the docs that come with QMIDI, a few things to note though: If you have a Wavetable-able card, load the SBMIDI driver with the /3 parameter, your midi's will sound much nicer. Use a batch file to load and unload the SBMIDI driver so your users don't get angry at you for crashing their computers.

Your music may sound different in Qmidi than in windows, signifigantly different, as if it were using a different instrument. I suggest using different combo's to achieve the best effect in QMIDI, screw windows. Some things just don't make as loud a sound as you thought, so try increasing the volume of that track

Okay, back to WinJammer stuff.
(I suggest you read this bit completely and carefully, as I explain quite a few things, and then admit my ignorence, and discover a few things myself that for some reason, when I really could have used them, I couldn't find.)

Making effects is pretty damned hard to do, I suggest you avoid them, as you have to change most of your notes manually. WinJammer isn't very good for thigns like that, but just straight music it can do well.

If you want to change the sounds of your notes, like the velocity and stuff, place the note, and then double click on it.

You'll see a new window called Note Event. Basically Midi works by events, everything it does is an Event in the midi file, and it just works out what each event means.

The top entry is Time, that's just where the note starts in the musical peice. The Channel indicates, you guessed it, the channel the midi is on. Key is the note played, and changing this is one of the few ways you can get sharps and flats, and the other way is stupid, so use this way. (Note: Wrong again, I am stupid today, I never really experimented with this thing. YES, you can get sharps and flats real easy, at the bottom of the sidebar, there is a wierd square will trailing lines, and below it, a pound (#) sign, clicking of the # lets you place a note like that, although it doesn't seem to differenciate between a sharp and a flat, it does then, provide DOUBLE the number of tones the track will allow, neat.)

Velocity, this tells how must pressue there was on the note, and I can't find a good way to get this high and STAY high, WinJammer is stupid here, cause I find many patches are too soft, and I can't seem to change a whole bunch of notes' Velocities at once. (Yes you can, I stupid, keep reading to find out)

Length, if you don't like being restricted to the note lengths given on the side bar, use this to change things around, make it slightly longer or shorter according to your needs.

Shift following events, basically, this means if you move the note around, will everything after it move the same amount of space too, usually, yes.

Now, if you want to change a few other things, but not Note events, you should use the button next to the synth keyboard button at the top, it looks like a small list (next to the tempo)

This shows you the raw events in your midi, like controller changes and such. Click on the window to activate it and left click, then say insert (new event). There are quite a few options here.

Note On: You basic musical note.
Key Pressure: Not really used, not decernable effects.
Controller change: Can do a few things, but I mainly only use this to increase the volume of a channel.
Patch Change: Have the channel change it's patch midway through.
Channel Pressure: Like Key Pressure, not used.
Pitch Bend: Suppose to bend the pitch up or down, doesn't do anything for me.
The other ones are for the really hardcore Midi'ers that want to use MCI commands and wavs, but since this is for Qmidi, and Qmidi doesn't care about those things, no point in using them.

Notice, in that entire set, there is no Channel Velocity, bastards! (Please keep reading, I'm a dumbass, look below, I was wrong)

There are quite a few useful things in the Track menu.
Clear Selection, Enter time 1 and time 2, and it will delete everything in between.
Track filter will kill everything from channel # to channel #.
Filter Events will kill all the event fitting whichever boxes you click.
Information will tell you a little bit about your current midi track.
Merge will combine the events on one track with another.
Quantize will take the current track and depending on the note size you give it, it will respace and reshape everything in the track to fit that size.
Replicate will copy from Time1 to time2, pasting it at Time4, num4 number of times.
Split will split the channel up depending on the parameter you give it.
Transform will Transform an aspect of the track by adding or subtracting num1, multiplying by num2, diving by num3 and then adding or subtracting num4. This can change a lot of things including NOTE VELOCITY, the thing I've been looking for, figured I would only ever figure it out when I write a tutorial, heh.

And finally, the Transpose it useful too, you can do chords. It takes all the notes and moves them up or down a certain number of semitones, experiment.

Now, a little trick. I've found that quite a few of the patches are too soft to hear generally, and sometimes even in Qmidi, and we now know how to increase the Tracks overall velocity. But if you add a bunch of notes and stuff, you need to do it to them too, but the Transform does to to the entire track, so whaddya have to do is, see, transpose all the velocities to 0 by multiplying by 0, and then "finnaly adding or subtracting" the number you want, like 100, there ya go.

Okay, enough WinJammer, but here's some of my favorite patches, I suggest you experiment with them, they are nice and seem to work well together:

  • Banjo - good tangy sound
  • Choir Aahs - really goosepimply feeling sound
  • Church Organ - very nice
  • Flute - I love flutes
  • FX 5 (brightness) - kinda harsh, but I like it.
  • FX 8 (sci-fi) - Really neat sound, I used it for everything in the past.
  • Ocarina - sickningly sweet at times
  • Music Box - Another goosepimply feeling
  • Pad 4 (choir) - like choir aahs, nice.
  • String Ensemble 2 - very good for background melody
  • Tubular Bells - love it, its a great patch
  • Voice oohs - like choir aahs, but lower, less sweet.

If you doubt my ability (heh, _I_ doubt my ability ^_^;; ) then why not listen to what I have made, then decide for yourself, do I know what I'm talking about, or could you do better without my interference. If you want a listen, goto...

There, you will find about 14 midi's, all named SBH##.MID, you can see the increasing complexity and better sounding melodies, remember, I've only been doing this for 5 months, I'm learning too =P

Notable Games that used/are using MIDI:
WetSpot2 - Not sequenced by Angelo himself, but he has good takes (Take Me On by A-HA)
MazeRPG (heh, um, 19day's game, the OTHER 19day, heh)
Space-a-Roo - had some great music in it, I still hum it.
Puz - neato music, I liked the feeling, puzzled.
Try them and see how well it works.

Making a simple midi:
First of all, make a new channel and track for it, and choose a patch, this will be the baseline. You can use Channel 10 to get drum effects. Generally, baselines are 1, 2 or 4 (sometimes) staff that have a constant rythym that repeats for the rest of the midi.

So just plunk down a few notes, and then use Track -> Replicate to copy it. Copy it about 10 or 20 times, we can trim it later.

Then make a new track, this will hold the melody. You usually have a few staves of beat, and then the melody rises from it, climaxes, and then dissolves again. So make a simple melody (the hardest part) with a good intro and exit.

Then I usually make a "backup singers" track, where I put a repeating non-baseline track, just to provide some sound other than the melody and the baseline, you'll see that in my midi's alot.

Looping Midi's:
This section will deal with two things at once, the looping of the midi music in the MIDI, and then looping of the MIDI in Qmidi.

The first point is short and simple: When you make your midi, begin it like you would a simple peice of music, usually not very complex, but the have the complexity increase as the song goes on, usually in sets of 4 segments. Then, have the music end abruptly, as it will be, in Qmidi, looping over and over, and if you build down the song and then have your baseline doing the same thing it did at the beginning, then when you hear it looped, that baseline or whatever low-complexity music you have going, it's length will double, because you hear it at the end, AND at the beginning again...

As for Qmidi, I have vers. 1 and 3, I hear 4.x might fix this problem, but I'm not sure. But according to the information in the past Qmidi's, there was no real easy way to check for the length of a midi in seconds, and have it repeat when it was over. What I did was use the MIDITIME! function, and made a sub called CheckForMidiTime, that is put in my RPG's main loop. It goes into the sub that has the the second times for the midi's I plan to use, and it's just an if statement that decided on the number of seconds to be put into a temporary variable. Then it checks to see if MIDITIME! is higher than that variable.

The reason I use a varaible as opposed of just doing the checking directly, is so I can add a new midi easily and hear it to see if QMIDI likes it, I just set the temporary var to 60 (1 min) before all the 1 line IF statements, so I can at least hear 1 minute of my new MIDI before making an IF statement for it.

Are you a newbie who is trying to splice Beethoven's 5th with "midgar.mid" from Final Fantasy 7? Go bug 19day until he does it for you!


Back to Top