Mixer and Amp gain really noisy

I suspect the residual noise from slewing is because its only a 1st-order correction to the previously discontinuous gain
changes - the derivative of the gain still has discontinuities at the start and ends of the ramped transitions, which contains
audible energy, albeit much less than before.

If you take a DC level as the gain setting, aggressively low pass filter this to below 20Hz, and multiply with the signal, you can
in theory remove any audible noise from gain changes - in practice this might add some small extra quantization noise
correlated with the gain changes. It involves quite a bit more processing though.
Thanks for working this through guys.

I had the same problem on my very first Teensy project and stripped the code way back to find out this is expected behaviour. It totally makes sense, but to be honest it did surprise me because it would be a pretty common application to drive mixer and amp inputs directly from pots, midi cc values or other "steppy" variables and frequency changes do not have this issue out of the box.

Using the AudioSmoothAmplifer object is a nice easy fix for me, so thanks ghostintranslation for the code! It would be great if this was the default amp/mixer behaviour.


Richard Allen