SV Filter - Higher resonance / self oscillate?

Status
Not open for further replies.

dslocum

Well-known member
How can I get higher resonance or self oscillation out of the SV filter? Is it limited for some reason?

Thanks
 
From Julius O Smith on Wikipedia: Higher Q increases the likelihood of arithmetic overflow.

In filter_variable.h, the following method is defined for setting resonance:

Code:
void resonance(float q) {
    if (q < 0.7) q = 0.7;
    else if (q > 5.0) q = 5.0;
    // TODO: allow lower Q when frequency is lower
    setting_damp = (1.0 / q) * 1073741824.0;
}

If I were you, I would simply remove the upper limit and see what happens. I don't think you'll brick anything.

Sorry I can't explain how that 5.0 limit was originally determined. I'd definitely be interested to hear the reasoning behind it.
 
I've been wondering too about self-oscillation of the state variable filter. I did exactly what cdh suggests, remove the limitation in the resonance setter.
With a resonance value of about 50000 the filter self-oscillates and produce a very nice sine wave, with pitch changes following cutoff frequency.

For the 5.0 limit, I believe it's an arbitrary level. The sound really changes between 0.5 and 5. If you go beyond 7, there's almost no audible difference. The more you increase, the less it makes a difference. And then at some point it starts oscillating.
I believe using some exponential scalling you permit both a usefull range and the ability to self oscillate, but I failed to find something working. I know some vintage analogue synth use an exponential potentiometer for resonance control.
 
I've raised the upper limits of the Q to 20.0 with no harm. I'd have to say it still doesn't reach levels of self oscillation common to many synthesizers. I'll have to look into reducing/ removing the damping as suggested. Sounds like fun.

50000? Uhm yeah , Ill have to try removing the clamping... :)
 
Sorry to revive a dead thread, but today I've been looking into exactly this.
Removing the state variable filter's Q limit of 5.0 and pinging the filter with a quick transient does result in long sinusoidal ringing --- the length of this tail can be adjusted pretty audibly between 5.0 and 100,000+, with clear increase in amplitude as Q increases.

I'm interested in the last line of the resonance code in filter_variable.h:
Code:
	void resonance(float q) {
		if (q < 0.7f) q = 0.7f;
		//else if (q > 5.0f) q = 5.0f;
		// TODO: allow lower Q when frequency is lower
		setting_damp = (1.0f / q) * 1073741824.0f;

Where does this coefficient 1073741824.0f come from?
The link to the comment on musicdsp.org describing the workings of the SVF object in the .cpp file is broken. I found this one, but figure it might not be the same: https://www.musicdsp.org/en/latest/Filters/142-state-variable-filter-chamberlin-version.html It does not include this large coefficient.

I'm thinking of tailoring this damping coefficient so that it stays more or less how it is now during regular range (q= 0.7 to 5.0), after which it is decreased (along with the input amplitude?) to allow true self-oscillation. Thought I would ask where this specific number came from before starting.
 
thanks, hadn't thought of that. do you know why specifically it's 2^30?
interested in where this range was calculated (2^27.7 to 2^30.5 in the teensy's SVF's case).
 
Status
Not open for further replies.
Back
Top