MIDI first appeared in August 1983 as a way for synthesizers to communicate with each other. Developed by Dave Smith from Sequential Circuits and Roland.
Today USB may be taking over but this little 5 pin DIN plug shows no signs of going anywhere, and I hope not too. 16 Channels of data, clock sync, program changes and more features why would it? It may be old but it’s stood the test of time!

A channel is basically a ‘sound’ that can be played, some synths (like my Nord Lead 2x) has 4 parts, each taking up a MIDI channel but can play 4 seperate sounds.
16 Channels may not sound like much these days, but that’s quite a lot of ‘sounds’ you can play on one cable… if you need more, computers can have multi midi ports, such as Ableton Live can handle a few of them on a multi channel interface.

What is MIDI.

Musical Instrument Digital Interface

First of all MIDI is not audio, it’s a protocol of serial data. For example a synth can be played by it’s own keyboard, or another keybord connected to it. The note information is sent via MIDI and the synth will play, just like if you’re playing it directly.
MIDI can do more than just play notes, we can sync via MIDI clock, or change patches on the synth for us via a computer, for live sets for example.

Above: Circuit for interfacing with UART (This has MIDI Thru but if you take out pin 1 of the 74LS14 and connect to TX on the microcontroller, that’s your MIDI out.
74LS14 are buffers, not strictly necessary for output from MCU. These buffers are always used for MIDI – they’re schmitt trigger, so will only switch when the input goes above a certain value – prevents noise.

MIDI port – 5 pin DIN, the only thing that uses this type of port these days, was very popular for Audio at one time!
I can never seem to work out the pinout, diagrams I find online I can never tell if it’s back or front view.
We’re only interested in pin 4 and 5 for MIDI

Using a microcontroller

we can harness this MIDI data and use it to do other things. A few examples are below:

Sync an output to MIDI clock, you can use this to sync an LFO on a modular synth for example, or flash a light to keep you in time with the music.

Receive notes/program change messages and use them to switch outputs to control other devices.

MIDI to CV (Control Voltage) and gate for playing triggering moduar synth oscillators with 1v/octave inputs

MIDI is opto isolated so it’s safe to connect a microcontroller project to your synth/sequencer.
Whatever ideas you may have, contact me and we can work something out for you, I can program and manufacture.


MIDI Running Status

Something to be aware of when designing a MIDI project, I ‘ran’ into this by accident when my Roland A300 Pro controller didn’t work correctly with the MIDI code I had programmed, this is because it sends out what’s know as running status.

This is basically a way of saving the odd byte of data and just sending the note data providing the last message received was a status.

So for example we press a key, this sends the NOTE ON, Note Data and Velocity, so we keep that key down and press another, it will then only send the Note Data and Velocity, no note on command as this has been sent. This is a pain to program and something that needs to be addressed, On all my latest MIDI code for Arduino I have allowed for this.

Not all synths/keyboard controllers send it, but it’s in the MIDI spec so they are well within their rights to.