I am trying to create a synthesizer and am currently stuck on making a clean sine wave. The ADSR envelope works by checking the time with the given ADSR values and applying a gain to a specific chunk. This seems to give the sound a "crunch" instead of continuous increase. Also, when keys are pressed in quick succession, the audio level jumps around and clicks and pops. Here is a link to the git https://github.com/bucketman09/synth_capstone. Continue reading...