[sdiy] Digital filtering of pot input

Andrew Simper andy at cytomic.com
Tue Dec 6 07:08:18 CET 2016

Whoops, I didn't realise that the link I posted was wrong and I never
publicly corrected it (several people emailed in private), here is the
correct link:


The basic idea is to use a two pole multimode filter with a low cutoff,
then use the bandpass output as a measure of how much the signal is
changing and increase the cutoff. The absolute value of the bandpass output
is used since it doesn't matter if the change is upwards or downwards, and
this is also scaled by a sensitivity factor, added with the initial low
cutoff gain factor and used to filter the input. It's a very straight
forward algorithm once you know it, but it did require some careful thought
to come up with in the first place. I'm very pleased with how well it works
and how conceptually elegant it is :)

Looking back at the code I see I switched from using and SVF to using two
cascaded one pole low passes since it was more stable, so the updated
algorithm operation count is 8+- and 5*. Here is a technical paper with
details on the algorithm:




On 3 December 2016 at 21:41, Tom Wiltshire <tom at electricdruid.net> wrote:

> That looks very interesting, Andrew. Can you tell us more? How does the
> "dynamic" part work? (Since we know what two-pole filters are already!)
> Thanks,
> Tom
> On 3 Dec 2016, at 09:40, Andrew Simper <andy at cytomic.com> wrote:
> > If you have enough DSP to throw at multiple boxcar filters and an IIR
> > you may be interested in a dynamic 2 pole low pass filtering approach
> > I've designed which gives these kinds of results:
> >
> > www.cytomic.com/files/dsp/dynamic-smooting.png
> >
> >
> > It takes 2 multiples, 6 additions, 3 bit shifts and an absolute value
> > for fixed point, or 5 multiplies, 6 additions and an absolute value
> > for float. Please let me know if this sort of algorithm may be
> > appropriate.
> >
> > All the best,
> >
> > Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20161206/475e368c/attachment.htm>

More information about the Synth-diy mailing list