issue #7

Midi Composing I

By 19Day

Be Mozart, thanks to 19day

Some muddled history:

Okay. First things first, what is MIDI. Well, in the 80's, it was Musical Instrument Digital Interface. What it allowed people to do is to record music into their computer by plugging their synth into the MIDI port (or whatever MIDI complient instrument they had) and play a peice of music to the computer, that would store the keypresses, velocities, tempo's and all that stuff. But rather than store the actual sound like in the WAV format, it just stores that data, which is very small in comparison to WAV's or MOD's (more on those later) because that's all there is, a bunch of numbers in a file. How does one play it? Well, back then, because it was for musicians, it played out the instrument they had recorded it with.


Download WinJammer!

Now, a year or two later, some guys who were making games (I dunno, some company probably started it) decided, hey, these MIDI things are really small, and they store all the information needed to play the music except for the sounds, so if we make a interpreter for the sounds, then we can get really small music, that sounds good.

I'm not sure whether the first one was in a sound card, or whether it was some software interpreter, regardless, MIDI was being used for that. And people began to forget the true meaning of MIDI, and use it like it was supposed to be used, but who cares, you can use it in your games.

Sizable choices:
Well, most of you have probably heard of BWSB, and it's abilities to play MOD-like music. Well, you can still use some of the idea's out of this series to help you, because MIDI sequencing and MOD sequencing are very similar, a MOD is basically a MIDI like file, but with the sound samples inside of the MOD as well, as opposed to being stored in the soundcard or some other system dependant place.

Now, the only real problem with MIDI's, is that they can sound very different depending on what kind of sound card they are being played on. Although the rest of the music is the same, playing "old MacDonald" that at one point sounded like a penny whistle on one computer, can sound like "old MacDonald" played on some sort of Spanish Bagpipe. Others will argue that the quality of music is not as good too, but really that's a matter of preference, I think the quality is reasonable on my soundcard set to the standard MIDI port, but when I kick in my WaveTable software based MIDI's, MOD quality, here we come.

Now, on my computer, I can make a MIDI that sounds like a MOD, and they can be the same with one exception, the MIDI is 1k and the MOD is 100k, if you want to have system independent music with constant quality and huge downloads, use MOD, if you want system dependant (to a point) reasonable quality and very small downloads, use MIDI.

Conversely, the tools we use to play these in QB are also a consideration. While QMIDI (the tool to play MIDI's in QB) can crash your computer more easily than work if you do it wrong, BWSB (tool for playing MOD's in QB) uses EMS that conflict with other EMS using libs, and can be hard to understand.

Choosing the sequencer:
Well, as far as I'm concerned, there are only 2 MIDI sequencers (midi makers) that I know of, WinJammer and CakeWalk.

I use WinJammer, the reason I don't use CakeWalk is that one night I decided to Download it, and it took forever, cause their server was slow, and when I installed it, it crashed Windows and cause a Illegal Operation in Explorer whenever I booted up, so it went bye bye and I stuck with WinJammer.

WinJammer's shareware version is identical to that which you would have for registering it, but when it's unregistered, all the NAME fields in the midi change to WINJAMMER DEMO, which, if you used that area to remember which staff was your drum and which was the melody, you'd be pissed, but you can type that stuff in the INSTRUMENT field, which does not get overwritten.

Basics of MIDI:
Each midi has a few things in it. Usually, the main bit is a staff, or a track. It is basically a music sheet area where you can plot notes for a specific instrument, keeping them separate from other instruments.

An instrument is known as a patch. There are quite a few in the GENERAL MIDI set and lots more in the other sets (soundcard dependant), but I always stick with the General set to make sure that everyone will at least hear SOMETHING akin to what I wrote.

The NAME is something you have to provide to a track to even let you mess around with patches and stuff, so make a new track by clicking the empty field in the NAME column and typing in a name.

Now, you have to assign the track a channel, basically, each track has it's own channel (10 is a special one, so don't use it yet) and that's how the soundcard understands what patch to use with which set of notes. So make that track's channel 1 or something, don't mess with PORT, and the last one, PATCH, is the instrument selector.

There are a few ways you can look at your music. You can look at it as events, as notes on a scale and as notes on a traditional musical staff. The only ones I find useful are the event and scale views. Now, if you wanted to make a simple (REALLY SIMPLE) song, then you should just pick a nice patch to start with, say, recorder (it's pretty whiny, so I wouldn't stick with it a lot).

Now, after setting up the track, click on the button that looks like a bit of a synth keyboard, and a new window will come up. This is where you start composing.

By default, WinJammer sets up things 4/4 and, and in the MIDI, each new segment, marked with a number, is separated into the 4 beats, and each beat is separated into 120 sub-bits (I don't know what they're called)notes

You have quite a few notes available to you, whole, half, quarter, all the way to thirty-second note, now click on the pencil icon (meaning WRITE) and click on the quarter note, and in the first quarter position, under the first segment, (that is, the first possible note on the sheet) move the cursor up and down and look at the bottom of the window (not the background window, the keyboarding window) and you'll see that it tells you the note positions, like A and D and such, so in the first quarter, put a note at A 4, then in the next quarter, a note at B 4, and another at D 5, and another at C 5.

Now, that should fill up that entire segment, so, with all the defaults in place, you can play your midi (you may have to set up WinJammer to your card, but it tells you how to do that)

Well, it sounds sorta nice, doesn't it, but very short, and not very interesting. So let's lengthen it. You can't COPY and PASTE notes like you might expect (why, I don't know) but there is a command called replicate, under the track menu. What you have to provide is a starting place for the COPY, ending place for the COPY, starting point for the paste and number of copies, in this case, the numbers are:

1.1:000 starts at first possible place
1.4:119 ends RIGHT before 2nd segment (otherwise it would be off by .001)
2.1:000 Paste at start of seg 2
3 make 3 copies, thus filling segments 1, 2, 3 and 4.

Play, well, it's longer, but kinda silly and monotonous, so lets make it a bit nicer, shall we. Just from listening to it, you might expect the 2nd segment to sound higher or lower, well, just different; I pick higher, so lets move a few notes around.

In segment 2, move the first note (click and drag) to G4, next note E 5, A 4 and F 5. The last segment should sound different too, lets say this was our entire song, well, usually songs have a feeling of closure about them, usually they do that by ending low. So in segment 4, move note 1 to A 4, 2 to F 4, 3 to D 4, last to F 4.

play? Well, sounds better, sort of haunting, needs a background... Something equally haunting. Make a new track, making channel 2 and the patch, make it String Ensemble 2. Now, click on the keyboard button (or on the window if you didn't close it) and chose the Whole Note, and the pencil again, and now, in the first segment, make 2 notes, one in F 4 and one in D 4, they should be parallel and be the same lengths. Segment 2 has notes B 3 and G 3, segment 3 has F 4 and D 4 and segment 4 had B 3 and G 3. Now, play...

Hmmm, spookier, but, here, try this, in that second track (string ensemble 2) take out all the lower notes, the D4's and the G3's, and play it.

One of the problems with midi is that too many notes can quickly make a song sound like gibberish, and make it sound like the notes are fighting to be heard. So we took out those overlapping notes, well, it sounds less full, but is a little clearer.

This is where preference comes in, where does body become less important that sound, some patches interact better than others, and some just sound horrible together. Experiment. And see how it goes...

The Right and Wrong Time for Midi Making:
So, you got your sequencer of choice loaded, you've sat yourself down and you're ready to make some Midi's for the next 5 hours, and they'll be great, and nice and the best damned thing ever sequenced... no. I've found that the technique of forcing one's self to be artistic is just plain counter-productive (I'm assuming everyone here is just an amateur at music; I mean, if you're a friggin' Mozart then go ahead, but if you're like me (no musical experience AT ALL) then you'll want to at least try this)

When you least suspect it, or when you're feeling cheery or sad, or when you don't feel like doing anything, try to sequence. If you're not paying attention, sometimes really nice things come out.

When I finally heard that fateful day that Milo had passed away, I was annoyed, angry and generally upset, so I decided to make a Midi that very minute (well, it took longer than that) and, well, it wasn't a sad midi, it was pretty angry, which reflected my dominant feelings at the time. Although it isn't my best, it did have a good beat and I might work on it again, but that's where the secret lies...

Random pieces:
Really, the big thing to ANY midi is some sort of either a) constant sounding theme OR b) a catchy bit that repeats in different instruments/pitches.

Now, you wouldn't believe how many of the latter I got just by placing random notes down, listening, trying to make it less harsh and then playing it for someone. (This is what happened for my SBH4.MID, that Tofu listened to) Tofu was able to pick out this one little bit that he thought sounded nice, so I redid my whole midi around that bit, added in supporting bits and, Voila, a nice sounding midi (well, nice enough for me).

So never underestimate what you can do with some random emotion and a shaky mouse-hand.

In the next installment, I will discuss some other musical styles and patch combos that work nicely, how to use QMIDI and how to use other events.


Back to Top

This tutorial originally appeared in QBasic: The Magazine Issue 7.