Our Final Project for ECE 476 was building a MIDI synthesizer using a MEGA 32 microcontroller. At first we wanted to tear apart an old keyboard and use the MCU to decode directly from the sensors which detected key presses. We then learned about the MIDI protocol and decided to use the MCU to decode MIDI packets sent by they keyboard and then play the appropriate note.
Once we determined which note the keyboard is trying to play, we are then able to synthesize the correct 8-bit sine wave. We then wanted to be able to send the output of our signal to speakers so we could hear the results.
This project was a great learning experience about how music is replicated digitally and also taught us a great deal about signal sampling and generation.
Our first idea for this project was to take an old keyboard and rewire it to use the microcontroller to generate sound to our own set of speakers. Our TA then suggested we decode the output of a MIDI keyboard and produce an appropriate sound. Our project is specifically designed for the Studio 610 plus keyboard by FATAR. This was the only MIDI device we had access to so we could not make our MIDI decoding scheme any more general. Our synthesizer is not guaranteed to work unless it is hooked up to this specific keyboard.
The overall setup of our project goes like this:
Keyboard Press —-> MiDI output —-> optoisolator —-> UART —-> code to pick correct note —-> DAC —-> low-pass filter —-> TV-speaker.
For more detail: MIDI synthesizer