High Level Design:


Idea Source
We developed the idea for our PIC32 MIDI Synthesizer from a mutual interest in music and entertainment controls. We tossed around ideas and landed on a synthesizer of some kind. From prior lab assignments in Cornell’s ECE 4760 and final projects from years past, we knew simple note synthesis was possible. We wanted to take this idea and expand upon it to a completed prototype design for a synthesizer. We wanted to further complicate the project, while increasing usability, by incorporating Musical Instrument Digital Interface (MIDI) control. Finally, we did not simply want to have our synthesizer produce basic sinusoidal waves. We decided upon implementing multiple wave sources and multiple effect options applied to those waves.

Background Math
The main principle behind the sound generation is Direct Digital Synthesis using a wave table. The shape of one cycle (either sine, triangle, or square wave) was stored in a table, and the chip rapidly indexes through the table at a constant sampling rate. The index is incremented differently depending on what frequency note is required. A larger increment would step through the table faster and produce a higher frequency note.

Logical Structure
The general pipeline of an event is to receive a MIDI signal which gives us a note value. We translate that into a phase increment used in DDS via a lookup table. We pass that wave data through whatever filters, effects and envelope triggers are active, then send the data out to the DAC.

Hardware and Software Tradeoffs
There were multiple tradeoffs between hardware and software that we had to contend with. The DAC that we had 12-bits of resolution. We chose to further restrict our resolution to 8-bits to appeal to a market that enjoys the nostalgia of 8-bit sound. Another tradeoff we had was to only process single note voices. This was because the effect processor we developed only could act on a single note at a time. Further development would have us modify this to process multiple notes. This simplification does not harm us too much because the UART processor in the PIC32MX250128b only has a 4 input FIFO buffer. Each note on/off command is actually composed of a sequence of 3 bytes. Concurrent note execution could lead to an overflow of the FIFO buffer. If an overflow occurs, the processor will no longer receive UART signals. If this occurs, we throw out the input data and stop execution of the playing note. This is so we don’t have the possibility of being stuck in a note. On the other hand, this also could cause a properly executing note to be killed. This tradeoff is beneficial overall though because it makes the synthesizer seem and play more reliably.

Relationship of Design to Standards
Our final project uses excerpts of the MIDI specification published by the MIDI Manufacturers Association (midi.org). The complete specification was unavailable to us because purchasing the printed copy (no digital copy available for purchase) at $60 would have surpassed our available budget. Enough portions of the MIDI specification are published for free to get communication working well, but we can not say that we fully incorporate the MIDI specification into our project. The MIDI specification further utilizes the standards of a DIN 41524 connector and a Universal Asynchronous Receiver/Transmitter protocol for communication.