"Click"-noise on note start

...
Imagine dee-dle-dee-dle-dee-dle-dee-dle-deeee - and this afwul farty kind of noise as it turns off.
...
We just laugh about it now, especially when people hear it.

If it were fart sounds i could maybe live with it as a "feature" :smiley: But unfortunally it really does sound more like going rampage on a old TV's antenna...white noise kind of thing

Exactly.
Looking at your code, you tried to put a simple LPF-like smoothing, which theoretically would work. But the problem is, even if the PWM carrier ramps up to full volume, the arduino output itself is still jumping directly to 5v.

I had the same problem with my synth. The problem could be solved by having the output centered on the middle of the output range, rather than just adding waveforms to 0. Add a capacitor in series to nix the DC offset, and the middle PWM value will become the new "0" point.
This was actually a problem for me, because no analog LPF's can filter out all of the carrier wave. I ended up getting a nice SPI DAC, since I use my synth for my electronic music-making, and the PWM wave, albeit inaudible, messed up recordings.

Good idea! So i would convert my wavetables from uint to int and use values between -128 and 128. Initial value for the pwm out would be 128. I will give it a try next week :slight_smile:
Also, which Hardware DAC are you using? I planned on using a DAC also, but never found a nice one (and no, i don't want to use a R2R ladder :wink: ).

In the meantime i update my Synth code a bit. I now have 16 channels with 4 voices each, giving me a total of 64 voices (i plan on adding a more intelligent channel->voice algorythm later where a channel looks for a free voice on NoteOn and simply uses it). I can also change wavetables on the fly. Next step is to add a touchpanel so i can change the ADSR curve on the fly. After that comes storing/loading the ADSR to/from SD/MMC. Can't wait to get this finished :slight_smile: