Rants And Ramblings About Mobile Technology

Anders Borg writing about the fun and crazy world of mobile and Internet service technologies.
You can also read the blog via Twitter or your phone via wap.abiro.com. See the left menu for more news.
Comments on blog entries are moderated, but I'm rather liberal as long as it's not blatant advertising.
For general comments, advertising and contribution queries, please use the feedback form.
Wednesday, September 16, 2009
MIDI, still going strong
Another one of those off-topic stories. I have plenty.
I discovered a toolkit for accessing MIDI devices from C# applications, so I hooked up my trusty 20 years old Korg M1 to my laptop via a USB-to-MIDI converter, and have had fun ever since.
As you most likely know, MIDI stands for Musical Instrument Digital Interface, and has been around for more than 20 years, and is physically implemented via the original MIDI connectors (DIN5, the same as was used for analog audio at the time) or via USB. Communication is all digital and serial, and what’s transferred is the events that occur (note on/off, pitch bend, etc) rather than the audio.
It’s extremely easy to connect two MIDI-compatible devices together, which was really the core goal: No need to know anything technical to hook stuff up.
As you might also know, MIDI was initially a rather slow protocol, clocked at 31.25 kbps. As each note requires 3 bytes (note on/off, channel, note and velocity in combination), the time resolution is approx 1 ms. You might think this is plenty, but consider a 6 to 8 note staccato chord. We are almost down to a resolution of 100 ms. Sure, there’s a possibility to compress Note on/off to only 2 bytes each, but this is still not really enough. This becomes even worse if you play a note-dense multi-track song (e.g. the M1 (and remember, it's really old) handles 8 tracks using different instruments) via MIDI. When MIDI is transferred over USB end-to-end the bit rate and hence resolution is of course much much higher. The data transferred is though the same as via DIN5.
More professional synthesizers and keyboards nowadays tend to come with USB/MIDI, but surprisingly many lower-priced devices still use only the original MIDI connectors for compatibility reasons.
MIDI supports numerous other commands than note on/off of course, like pitch bend, program change, etc, yet where synth manufacturers tend to go crazy is in the use of System Exclusive, that enables proprietary exchange of sound banks and other data, so you can re-program your synth via MIDI.
Anywho, the short term goal is to re-write my MIDI echo I “invented” a long time ago. It essentially plays back notes at set delays, with the added twist that the sound played back might be completely different from the original one. As MIDI is all digital I simply offset times, notes, velocities (essentially volume) and channels any way I want. By switching to a new channel an initial piano sequence could be played back as a soft pad at a lower volume and in a lower octave a few seconds later etc. It was an extremely effective creative tool, so I've missed it since MS-DOS came out of fashion.
I have my eyes on a Korg M50, that is way better than the M1 (it should be, considering the time difference), except for the not as good keybed, lack of aftertouch and less sturdy casing.
And I need to learn to play too.

