top of page
Writer's pictureMartyn

Reaper - A Tale Of MIDI Export

If like me, you have a bit of a love for General MIDI song files, this blog post might be of interest to you! Well, useful I hope, and at the very least something to pass the time for 10 - 15 minutes while you sip your coffee and reminisce about the old days before computers came along and bestowed endless possibilities upon us and our music making lives. It's something I've not been able to find much information about on the internet, so I thought I might as well have a go at explaining it all as best I can.


For my last floppy disk release (DATAdisk Vol. 1) I was keen to use the available space on the disks for a few file types that you might well have found on them 'back in the day' - and since I would struggle fitting the actual audio files for the songs on the disk*, it seemed like General MIDI song files would be the answer. Happily, this worked really well and I've since had some feedback from the wonderful folks who bought a copy, reporting that the files do indeed work, and are interesting playable versions of the original songs, can be loaded into their own DAWs or simply played with the ever popular Microsoft GS Wavetable Synthesiser.


*You CAN fit lots of audio onto a floppy disk, but I can tell you now, it sounds pretty bad, though some record labels have done this to great effect. It requires very low sample rates and bit depths, which might suit some music, but certainly not all.

Creating MIDI files isn't something a lot of people probably make use of these days, and there are different types too, plus there are plenty of things to consider before you embark on making one. That's where I'm hoping this post might be of use, fellow MIDI explorer...

If you want, you can indeed preview all your hard work using the Microsoft GS Wavetable Synthesiser, something which Reaper, tells us to use with caution...

For this demonstration I'll be using a song from forthcoming DATAdisk Vol. 2, and I'm assuming that you already know how to record or program MIDI into Reaper. First off, we have to figure out how many MIDI channels you're going to be using in your song. Typically, you'd have a MIDI channel per part (bass, keys, drums etc) with program change messages setting which patch you want per channel, something you'll need to add if you want to hear anything except piano sounds! If you want to up your MIDI game you can also add program change messages within the song to change patches on the fly.


Below you can see a screenshot of my project file - I've got 7 tracks of instruments and 1 track of drums (although they are split into multiple lanes). Channels 1 - 7 have been used to output separate channels of MIDI to my Korg 05R/W running in multitimbral mode, and the drums were outputting to channel 10 (as is customary in the world of MIDI). One thing that's important to mention, is that it's easy to confuse MIDI output with MIDI channels - in this case, the output was originally to my external synthesiser, whereas the channels will be internally routed within the finally exported MIDI song file. I'll come back to this and why it's important in a bit.

Each of those 8 tracks needs to become a separate MIDI channel, so that when the song file is created it knows which instruments play which parts, respond to pitch bend, program changes etc, so the first thing I'm going to do is consolidate separate MIDI clips on the same track into one clip. You can glue MIDI clips together be selecting them all and right clicking on them and choosing - 'Glue items' in the pop up menu.

I also extended the newly glued clips so that they were all the same length, and start at exactly the same place. Reaper has an option called 'Loop item source' that I had to turn OFF to achieve this. It can be found by right clicking on a clip - selecting 'Item Settings' and toggling on the pop up menu.

Even though the drums were in separate tracks / lanes, consolidating them into one clip is done much in the same way, dragging MIDI clips on top of each other and then gluing as before.

So at the end of all that, I've consolidated my separate clips into one per track, made sure they're all the same length on each track and that no looping is occurring. My project looks a bit like this...

Each track now has a single MIDI clip, and each is the same length starting at the same point.

Now that everything is organised - the next step is to make sure that each track (or instrument) is outputting to the correct MIDI channel. It took me a while to figure out how to do this, and this is why it's important to appreciate the difference between MIDI hardware output and internal MIDI channels. So lets take a gooooood look at the piano roll window...

You can use program change messages to set which instrument is associated on it's particular MIDI channel, the MIDI specification has 128 in total, and these can be changed at any point in the song.

As you're probably aware, here we've got lots of note data at the top, program change in the middle there, and note on velocity at the bottom. The yellow arrow is what we're interested in - a specific button to see what is assigned to each MIDI channel. By default, it's set to ALL CHANNELS - but you can change this and filter only those you want to see. When you create or record a MIDI clip, by default it assigns all the events recorded or programmed to MIDI ch. 1 - great if you want it to be channel one, but otherwise it needs changing so HOW do we do that? Well, hold on to your hat!

In the video above, I first open CH1's MIDI clip - and show that all events are assigned to CH 1 - by selecting all (CTRL/CMD + ALT) and then going to the event properties dialogue box (right click or CTRL + F2). Here's where the magic happens - you can then assign any notes, events or data in your piano roll to specific MIDI channels. In the video, I then open up CH2's MIDI clip, and demonstrate this change, using the MIDI CH filter button (yellow arrow) to show that all the data has now moved from CH1 to CH2. Phew.


I then carried on and did this for each subsequent track in the song, assigning the correct channel and making sure that ALL the event info was included, sometimes I found that pesky program change messages didn't always switch assignment, so it's worth checking again. It's also good practice to chuck a program change message at the start of the song, to make sure the appropriate patch is selected from the beginning. In the case of the drums, I assigned CH10 as before.


(It's worth heading on over to the MIDI Association and downloading the full General MIDI patch table so you're aware of the instrument and drum assignments before exporting, though it's fun to see what happens sometimes...)

Now that each track has a single MIDI clip, with the correct channel assignments for it's part we can export a MIDI song file, what a wild ride eh? This process is fairly simple, but there are a couple of points worth mentioning. Firstly, it's a good idea to select the clips, tracks and time selection we require before we go to export, then go to the 'File' menu and click 'Export Project MIDI...'

After that, it's important we select the right format for a multi-channel MIDI file (type 1). This will make sure that each of our new channel assignments is honored and faithfully reproduced and hopefully any associated event data (pitch bend, modulation etc) will also work properly and on the correct channel. Type 0 would squash all our channels into 1, and have every bit of information played by a single instrument, it sounds as bad as you imagine.


Once exported, you should have a rather small .mid file which contains each of the parts of your song, in separate channels, played by the instruments of your choosing (via program change messages) Hurrah! Now take another sip of coffee, sit back, listen to your song in it's retrospective newness and enjoy. Standard MIDI song files are still playable via Windows Media Player (via the Microsoft GS Wavetable synth) and a bunch of other software, or in fact on many mobile phones, so there's no excuse not to see how it sounds on different platforms (I think that's part of the fun). You could even bung that MIDI file on a floppy disk and see how it sounds in your hardware MIDI sequencer.

I hope that's been a useful read for you MIDI lovers out there, I'd love to hear if you have any thoughts on the process, or indeed if you have a better way of approaching it, so do let me know. I may well look into the wonderful world of programming MIDI in more depth at some point, including using program change, bank select and other topics too if anyone is interested, which of course, you ARE right?


Martyn ☕


A bit of further reading...


MIDI Association - General MIDI (1) Specification

MIDI Association - General MIDI (1) Soundset


0 comments

Recent Posts

See All

Commentaires


bottom of page