Electronic – Hardware based MIDI decoding / synthesizing

audiomidipwm

I have a lot of old MIDI equipment that was recently given to me by a retired music teacher. I have a lot of interest in it, and would like to make a MIDI synth. It does not need to be high quality or sample based, but I want to know how to implement a MIDI decoder in hardware.

I know that MIDI is just digital signals representing instruments, so I'm thinking something like this.

quick and simple diagram of what I want
Yeah, it's not a technical diagram. But basically, I want a really excellent guide to how MIDI works. What the signal contains and so on. I have an arduino ready to act as a PWM generator, and I have tested it. It just needs to generate simple waves (like square waves, NES/Famicom style).

Does anyone know a concise, easy to understand documentation for the MIDI standard? Something like what would be in "The Art of Electronics" (the textbook) if it talked about MIDI at all. Something that a beginner could understand, preferably. I mainly work in analog technology, so this has been a new experience for me.

Thank you. (By the way, I'm not asking you to build it for me; I just want to know where a good document is. I want to do this project on my own. Nothing more complex than simple logic IC's, so don't tell me about those MIDI generating IC's.)

Best Answer

Start with, say, a guide to the protocol.

Given that you've decided to use an Arduino, you can just speak MIDI more or less directly. There's even a handy tutorial on the Arduino website for MIDI out! MIDI input is slightly more electrically complex as you're supposed to have an optoisolator in there to avoid ground loops.

It's almost entirely a software project, but if you're willing to pick up code from the internet should be reasonably straightforward.

Edit: a bit more googling has found someone who's actually done this, in 40xx CMOS rather than 74: http://www.pykett.org.uk/a_midi_pedalboard_encoder.htm

That's MIDI output rather than input. I still maintain there's no point doing it by halves: if you're going to do MIDI decode in hardware, do all the audio in hardware too, don't just put an Arduino in there as a PWM generator. And if you do have the Arduino, let it do the protocol bit and consider moving the audio side to analog.