PIC MIDI synthesizer
PIC MIDI synthesizer
Not logged in

The synthesizer has a very basic design.

For audio output, the PWM mode is used. Unfortunately this signal is rather weak, and I've yet to make a workable amplifier for it. Currently a 255(*4) clock period is used with a 10-bit PWM value.

Thus, the audio itself is built using samples. These are a plain average of the output channels (of which there are eight). Each channel uses a 24-bit counter to handle every possible frequency, of which the top 8 bits determine wave phase. The 8 bit phase allows for direct table lookups by loading it directly into PCL (for flash), FSR (for RAM) or EEADR (for EEPROM).

MIDI input is through the UART. It has been tested with a Roland keyboard.

Building

The final project report is a Noweb blend of LaTeX documentation, a Makefile, Python scripts, C and almost-C source code. To build, run noweb on synth.nw to extract the Makefile, then run make. Of course, it'll probably fail because the Makefile expects to find the compiler in an odd place.

Prebuilt

For those that don't wish to set up all of TeX, CC5X, Noweb, Python etc to build the stuff, here's a precompiled HEX file and PDF.

Cloning

Due to a bug in fossil addresses with ~ or other special characters do not work well as remote-url. I have set up an alias at http://donkey.vernier.se/fossil/picmidi which you can use when cloning or pulling.