Self resonating filter - impulse response length

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Say I send an impulse to self resonating filter. Resonance is set slightly below self oscillation so that I can hear a decaying sinusoid. In digital implementations decay time depends on filter frequency. But does analog filters behave the same way? Is this desirable to keep this time constant and decoupled from cutoff? I suppose HPF in feedback loop does something similar.
Do any synths work this way?

(maybe this question is stupid, but I don't feel it yet)
giq

Post

an ideal resonant filter, with resonance set slightly below self-oscillation, would oscilate N number of times till it decays down to a given point, no matter the cutoff freq (thus at higher freqs the decay will be shorter in time)
also note that if you excite this filter with an impulse - the oscillation amplitude will be lower on the lowest cutoff freqs

real filters might not be so ideal and have HPF effects in the feedback
some even have to an excessive level
example: the TB-303 filter, it has like 4 HPFs in the feedback, two of them are set at some pretty low cutoff (2-3Hz) but the other are set higher (i don't quite remember)
as a result, this filter resonates less on lower cutoff freqs (thus the resonance decay is also shorter, unlike the ideal one)
i quite like the effect of having a HPF in the feedback
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

itoa wrote:Say I send an impulse to self resonating filter. Resonance is set slightly below self oscillation so that I can hear a decaying sinusoid. In digital implementations decay time depends on filter frequency. But does analog filters behave the same way? Is this desirable to keep this time constant and decoupled from cutoff? I suppose HPF in feedback loop does something similar.
Do any synths work this way?
You can do either constant Q (= constant band-width = frequency dependent decay time) or constant decay time, but it's a choice between the two in analog as well. Usually for regular filters (whether EQ or synth filter) you'd want the Q to be independent of cutoff (and for most filters this is the natural behavior anyway), so the frequency dependent ringing time is what you'd expect.

As for HPF in feedback loops.. the most interesting effect of those tends to be the way they affect the behavior of non-linear filters, as the low-frequencies through the loop can be important part of what happens to a signal when it is distorted. Depends on the specifics, but sometimes the effect is quite dramatic... and the 303 is pretty much the extreme case.

Post

Most probably 2nd method is used in drum synths, like t-bridge in 808.

Thanks guys for the great explanation.

From my observations: in heavy driven nonlinear ladder filter, HPF in feedback "protects" lower partials from being attenuated. But as Mystran said, on the other hand these partials play significant role in distortion and brings "this kind of" character. Need to spend more time on this.
giq

Post

Maybe I did it wrong - but doesn't the passband gain get excessive loud with just a single hp in the fb-loop, because it counter acts the negative phase, especially if your design requires high feedback levels?

Post

My filter is a ladder with 5 sigmoid saturations for each stage. Feedback HPF is tuned to 50Hz. If I filter low freq signal, lower band gets louder but only up to saturation limit. The gain of lower partials is equal to resonance peak. Mid-bands are in the notch. I don't use AGC.
giq

Post

if you put just 1 HPF in the feedback - the negative feedback only lacks low freqs, thus the filter requires higher levels of feedback to reach oscillation at those low freqs

if you put 2 HPFs (iirc) they can create a new resonant frequency (besides the main filter cutoff freq)
the 303 filter has this phenomenon going on

no problems going into self-oscillation even with all that, so check how you apply your nonlinearities
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

you mean 2 - 6db hpf's in series in the feedback path? It will mess up the phase, but how 2nd peak is created? If the filters are constant..
giq

Post

this applies if you're modeling a filter like the sh-101 wrote: You need to ensure you use a diode-like clip, and that the filters are arranged in the correct order. If you use a tanh for the clipping that'll work, but won't produce nearly the same sort of effect. A hard clip is actually a lot closer with regard to dyamics, but further with regard to harmonic.

An easy way to approximate a diode clip is to have two linear sections with a "soft knee" between them. You can get very, very close this way. Computing the complete diode function is very expensive but you might want to look that up and implement it for completeness as well. Keep in mind the computation of the forward current is dependent upon forward current, so there are a variety of approximations available to deal with this.
The passband should normally be increased in level, in fact this is a critical effect. Just ensure you are getting the correct frequency and phase from your filter or it'll throw everything off.

Typically the frequency in cascaded filters like the 4-pole is very low. It attempts to be as close to DC as possible. The filters in the sh-09 and others for example actually are DC.

(edit: sh-101 uses a darlington emitter follower with approximately 10u, 20k feeding the diode clamp.)

The minimoog highpasses are approximately 1hz, if I recall. Check the schematics, as usual. (edit: approximately 10u, 1k. Of course the output differential amp is also fed with 220n, 47k approximately, not taking into account the current into the bases.)

The 303 of course is a lot higher and there are multiple filters in series plus the level compensation, (output * (1 + feedback)) is perfect but the approximation in the 303 is more complex.

Again, you need to be absolutely sure the frequency and phase of the filter response is exactly correct or you won't get anywhere close. Doubling the frequency can have a major effect on how the filter behaves.
you mean 2 - 6db hpf's in series in the feedback path? It will mess up the phase, but how 2nd peak is created? If the filters are constant..
You need to learn to read schematics and start taking your information from there.

303:

input: 1u, 2.2k
pre output saturation (diff amp): 100n, 100k
post buffer: 1u, 50k (approximate) (#1)
post res pot: 1u, 20k (approximate) (#2)
post second buffer: 1u, 12k

So we have the input filter, then we have four highpass filters in the feedback loop.

(#1): this is going to be variable frequency because the resistance will change at the res pot is adjusted. At the highest res setting you'll be going directly into the base of the buffer transistor, so you'll have 102.2k in parallel with 50k, plus the current into the base and 10k at the emitter, plus the current into the highpass at the output of the emitter into the 10k and 2.2k (12.2k).

Computing all the stuff for #1 is a pain! May be okay to approximate it in most cases.

(#2): this one is complicated. The 2.2k is obvious, but you'l see the 100k dc bias at the base and 10k at the emitter. The current into the base will be scaled by HFE, given 10k there I would guess you'd see 33k or so. Then you need to mix with the 100k base bias source, 20k is a very rough but possibly reasonable guess.

Best way to solve this? Use the correct transistor models and let spice compute it all for you directly. Should get exactly the same results as bench testing.

The three last filters are horribly complex because the first two feed into the others. 1 -> 2 -> 3.

This is all a super complex subject!
Last edited by aciddose on Tue Apr 22, 2014 9:26 pm, edited 3 times in total.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

fyi, a pure hard clipper is what i use in the 303 filter
it probably isn't accurate (as aciddose explained), but tanh() is plain wrong, so the hard clipper was my bestest candidate ;]

and yes, 6dB (first order) HPFs is what i'm talking about
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

For the 303 actually the clipping is due almost entirely to the differential amplifiers at input / output of the ladder, so tanh with some small adjustments is very close. Probably a tanh approximation with some tweaks will get way closer and also be cheaper than using some combination of multiple tanh functions. In the case of the current generated by voltage applied to the input of a differential amplifier, tanh is actually nearly spot on, just not accounting for the "real world" transistor effects.

You don't need any additional clip other than that naturally imposed by the saturation you use to model the input/output stage and buffers. The buffers will produce a hard-clip at negative and a saturation at positive. Put some research into "emitter follower" if you find this is an issue. Spice simulation again will produce the fastest possible accurate results, you'll be able to see exactly where saturation and clipping occur and which stages are not important to model.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

Learning electronics would be an option :). I know basics and currently have no time to grasp more :/

As I have you here :)

One thing is bugging me:
http://www.arturia.com/evolution/en/pro ... pping.html

"In analog synthesizers, the resonant filter uses a current limiting function,
preventing the signal from being too loud (soft clipping). "

Is this an LPF filter with cutoff controlled by input signal level? How and where it's used in analog filters?

Thanks in advance
giq

Post

Who knows what they're talking about there.

No, there is no current limiting unless you consider a resistor into a diode clamp to be a "current limiter", which may be fair but doesn't make much sense to describe that way.

Filters "use" a diode clamp which does not limit current but instead throws part of it away, dependent upon the input level.

http://en.wikipedia.org/wiki/File:Diode ... t_wiki.png

See in the forward direction current rises exponentially until Vd, where the current will then flow more quickly than it is supplied for rising input voltages.

So you get very close to perfectly linear up to Vd, then after Vd the extra current (therefore voltage) is thrown out very quickly.

You can do this with something like two linear sections with a parabolic or cosine interpolation between the two to form a "soft knee".

The first:
0.0 = 0.0
0.7 = 0.7

second:
0.72 = 0.705
1.0 = 0.78 (continue this line forever)

Then fill in the gap between the two with the interpolation.

Your "diode function" then looks like:

Code: Select all

if (abs(v) <= 0.7) return v;
if (abs(v) <= 0.72) return interpolate(0.7, 0.705, (abs(v) - 0.7) * (1.0 / 0.02));
return (v >= 0.0 ? 1.0 : -1.0) * lerp(0.705, 0.78, (abs(v) - 0.72) * (1.0 / 0.72));
Just typed that off the top of my head, untested. You should get the idea though. Ideally you'd be generating a table filled with real calculated voltages given a specific R -> d and using an interpolation that is both efficient and error-minimizing.


What they're probably talking about though is the saturation (tanh-like) from the differential amplifiers. Absolute bullshit, there is no soft-clipping that would prevent the signal from being "too loud" to hard clip at later stages in the vast majority of circuits. This is most likely written by arturia's marketing dept.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

I think a Gallo wave shaper would be appropriate here. (patented :])

Yep thats what I thought when I saw this... this phenomenon exists but in magnetic tapes :)
giq

Post

Aciddose: are you sure it's a marketing crap? e.g. afaik diode clipper is kind of filter and it's frequency dependent. (from a black-box perspective does this result in "harder clip" for lower frequencies?)
giq

Post Reply

Return to “DSP and Plugin Development”