So I decided to actually make some documentation, and so I thought I'd make a new topic.
Anyway, here it is, my Arduino synth!
It has a MIDI input, output, and thruput; 6 buttons and 6 pots for input; an 8*16 RG LED matrix; a 9-bit audio output, so far capable of synthsizing 8 note polyphony wavetable synthesis, including a variable pulse width square wave, with volume control on each note.
Here are all the insides of the synth:
Click on the photo to go to the Flickr page, where there are mouseover notes on the parts of the synth.
Here's a photo of the front face:
The code of the synth has a few main parts: the MIDI handling code, written by me using the MIDI library; the LED matrix and button input code, which both use hardware SPI; and the synthesis interrupt routine, which is called at 32500KHz. This was written in assembler for optimal speed, since the interrupt is called every 512 clock cycles. Major thanks to joemarshall, his synth is here, and the meeblip project, here, for help coding the assembly code. (I had never before written in assembly)
I designed the sketch to be easily expanded; the MIDI input handling can handle 8 notes at once on each of 4 channels, even though only 1 channel is currently used. There are other things that aren't optimal for the current capabilities, but will be useful once I add new features.
Code in the next post!
Nevermind, it'll be much easier to just attach the files. I used a bunch of tabs to make things more organized in my eyes, so I made a zip file of the sketch folder, with all the neccessary files. The MIDI library is the one here, and the SPI library is the standard one included with the IDE.
Here's a video!
MIDI_synth_test_assembler.zip (8.05 KB)