This second video improves upon the basic waveform generators in the last video, to produce a flexible oscillator. The amplitude of the oscillator is now controlled by an Attack, Decay, Sustain, Release envelope, to produce some more realistic instrument sounds.

All the code is available from here: GITHUB: https://github.com/OneLoneCoder/synth/blob/master/main2.cpp

Blog: http://www.onelonecoder.com