Clicks on rapid filter cutoff modulation

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi all,

I've developed a VA synth plugin with a moog ladder LP filter. I quite enjoy the general sound I'm getting, but one thing that bugs me are the sometimes very loud click artifacts on very fast cutoff frequency modulation with high resonance levels. It's most prominent during attack phase when doing envelope modulation (attack time 1-10 ms). I could remedy the problem for the case that a synth voice starts from a silent state by zeroing the filter memory on note start. However, this method is not allowed in the case the voice is assigned a new note while its still playing an old note.

Do you have any suggestions how to cope with the problem in the general case?
Does this problem occur in hardware analog synths and, as such, can be regarded as something one has to live with?

Some remarks:

* The amplitude of the peak artifacts heavily depends on the combination of different parameters like note pitch, osc waveform, mod depth etc. The clicks are only appearant in some situations, but then they can get loud.

* I tried out a number of other plugins (free and commercial) and most of them did not expose the described problem as drastically as my plugin.

* Filter modulation in my plugin is realized by modulating the cutoff parameter itself and recalculating the coefficient of the 1st-order filter stages. Thus, the calculated coefficients should always lead to stable filters.

* However, in some discussions I read that a filter can become temporarily unstable if the state does not "match" the filter configuration (coefficients). I imagine this could be the problem here.

* I'm using a coefficient tuning table as suggested in the literature to cope with the delay in the feedback path. Also, I'm doing 4x oversampling.

Thank you in advance for your help!

Dominique

Post

analog synths usually don't have such a problem
since usually the VCO is before the filter, so the filter always filters the waveform, no zeros..
if you're doing a VA, then i suggest you do the same

the cutoff modulation itself, are you recalculating the coefficients per sample or in some periods?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

antto wrote:analog synths usually don't have such a problem
since usually the VCO is before the filter, so the filter always filters the waveform, no zeros..
if you're doing a VA, then i suggest you do the same
I see your point but I don't think this is the issue here. Like I said, The clicks appear also when a voice gets retriggered while it's still playing an old note so that there is already a continuous non-zero signal stream at the input of the filter.
antto wrote: the cutoff modulation itself, are you recalculating the coefficients per sample or in some periods?
I'm updating at the host sample rate, but the filter is working at 4x this rate.

Post

can you record an audio sample demonstrating this?
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

Analogs will click as long as envelopes are fast enough and CV paths don't have any extra smoothing, which is one way to do percussion sounds too. Many plugins do separate control rate (+ interpolation) which puts a lower limit on transient times and possibly shape the click spectrum. Envelope stage of around 1ms will definitely give you a click that will be audible (at least for larger sweeps) if the output wouldn't otherwise have much high-frequency content (bright sounds tend to mask the clicks). That said, depending on your implementation you could get all sorts of clicks that do not happen in an analog ladder..

The internal gains of the ladder can be meaningful for the transient response, and there are variations that will gain (or lose, depending on direction) energy on very fast changes in cutoff. If it seems to temporarily throw you huge amplitudes, you probably have some such problem with your implementation. Also if you have embedded non-linearities, those can cause problems if not placed carefully.

Without audio samples and/or knowing which exact variation you are using, it's pretty much guesswork unfortunately.

Post

mystran wrote: ...
Thanks for the interesting clues!
mystran wrote:Without audio samples and/or knowing which exact variation you are using, it's pretty much guesswork unfortunately.
I think I'm going to prepare a MATLAB script demonstrating the issue to make sure not to leave out any relevant information regarding my filter implementation.

Post

OK, after doing lots of experiments, I ultimately consider the problem solved and just wanted to report back. Compared to my original filter algorithm my new implementation looks like this:

* avoids delay in feedback using the "Topology-preserving transform" (TPT)

* The 4 cascaded 1st-order sections are implemented using TPT as well, as described in the paper (replacing s-domain integrator by trapezoid integrator). This yields smoother signals on rapid coefficient changes compared to my old implementation (some direct form), but contrary to my hope, did not really reduce the loud clicks.

* Finally, the actual cure to my original problem (clicks) was to move the tanh-saturator from the feedback path to the input of the 1st-order filter cascade, i.e. changing

x1 = x - k*tanh(y4)

into
x1 = tanh(x - k*y4)

Cheers

Dominique

Post

I would worry about the tanh solution doesn't really solve the problem but just mask it. x is the input right ? So unless you oscillator code does something funky the only suspect is k. I would do checks to see if k gets any suspicious values indicating a problem.

Post

You shouldn't be seeing this unless there's something funky about your filter model.

Could it be a denormal issue instead? (Do you get processor spikes when you hear the glitch?)

I can audio-rate modulate my ladder filter.

Could also be something about resonance behavior. You need to clip it to keep it in sane range.

Post

i've used the s/s digital moog implementation several times. with no oversampling, the s/s moog can 'pop' at nyquist, so with oversampling it shouldn't exhibit this behaviour.

though some people will rag on it, i've audio rate modulated lots of unimproved "standard" filter forms (biquads, svfs) with what i consider acceptable results, eg. no overt artifacts. try removing your amendments and reevaluate them? :)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

One thing to watch out is the gains of the individual 1st order stages. If your self-osc feedback point stays at 4 you're probably safe, but if you need some gain multiplier, you will want to distribute it to the individual stages. If your 1st order stages have a zero (ie bilinear transform) then put the zero before the pole such that you get the correct gain directly into the leaky integrator. This should mostly fix the problem where changing cutoff causes large short term changes in output amplitude.

As for the tanh at input, it really should be for the combined input and feedback gain, so your "fix" there is actually correct from the point of view of the original circuit. If you are doing per-pole saturations, then even with zeroes you can reuse tanh output from the previous stage just fine without any huge damage.

Post

AdmiralQuality wrote: I can audio-rate modulate my ladder filter.
Yup, I'm not even doing any TPT stuff (ie just dealing with the feedback with old-fashioned zero placement) and I have several variations of the ladder and they all survive audio-rate modulation just fine.

Post

mystran wrote:
AdmiralQuality wrote: I can audio-rate modulate my ladder filter.
Yup, I'm not even doing any TPT stuff (ie just dealing with the feedback with old-fashioned zero placement) and I have several variations of the ladder and they all survive audio-rate modulation just fine.
Yep, the other limitation I make is the cutoff coeff only goes so high, not all the way to 1.0. So you need to check that's in a sane range too.

Post

AdmiralQuality wrote:
mystran wrote:
AdmiralQuality wrote: I can audio-rate modulate my ladder filter.
Yup, I'm not even doing any TPT stuff (ie just dealing with the feedback with old-fashioned zero placement) and I have several variations of the ladder and they all survive audio-rate modulation just fine.
Yep, the other limitation I make is the cutoff coeff only goes so high, not all the way to 1.0. So you need to check that's in a sane range too.
You mean like (assuming some oversampling) clip the resonant frequency slightly above Nyquist? Yeah I do that too.

Post

mystran wrote:
AdmiralQuality wrote:
mystran wrote:
AdmiralQuality wrote: I can audio-rate modulate my ladder filter.
Yup, I'm not even doing any TPT stuff (ie just dealing with the feedback with old-fashioned zero placement) and I have several variations of the ladder and they all survive audio-rate modulation just fine.
Yep, the other limitation I make is the cutoff coeff only goes so high, not all the way to 1.0. So you need to check that's in a sane range too.
You mean like (assuming some oversampling) clip the resonant frequency slightly above Nyquist? Yeah I do that too.
The cutoff frequency, yes. Don't let it hit the top or the resonance will a-splode! ;)

Post Reply

Return to “DSP and Plugin Development”