Arduino MIDI synthesizer (Part 3) - ADSR envelope
This part explains how ADSR envelopes work. Unfortunately we hit the limits of the gcc optimizer and and the performance issues force us to go down to 11kHz sampling rate :(
This means no further features like LFO etc until we switch to assembler but then just few would be able to follow. Sorry folks.
Source code can be found here:
http://lab.bitluni.net/arduinosynth
You might also want to read about (it's used to calculate the ramps):
http://en.wikipedia.org/wiki/Linear_interpolation
Basic infos about synthesizer can be found here:
http://en.wikipedia.org/wiki/Synthesizer