pub struct Svf { /* private fields */ }
Expand description

This is a 2-pole multimode filter.

This is a 2-pole multimode filter loosely based on the one found in the edp wasp synthesizer. It’s a good all-around filter that distorts nicely and keeps resonance well at high levels.

It’s capable of outputting all basic filter modes (lowpass, highpass, bandpass, notch, etc.) and self-oscillation.

OTA core, nonlinear op-amp buffers. The EDP wasp uses inverters as a weird extremely nonlinear op-amp buffer, but I haven’t looked into how to model that (in a way that converges well) yet. Resonance is limited by a diode clipper on the damping feedback, boosting it when gain is high, since it’d otherwise disappear because of the opamp nonlinearities, which would lead to the resonance completely dominating the signal.

Its convergence is generally good. The convergence gets a lot better when oversampled 2x or more, which I recommend anyway since it distorts.

Circuit solved by Holters & Zölzer’s generalization of the DK-method. This method has a lot of advantages compared to the other approach, namely it’s much better equipped for handling nonlinear voltage-controlled voltage sources such as op-amps and jacobian matrices are only necessary on a per-component basis, meaning it’s not necessary to solve the whole system each iteration, speeding up iterations significantly. Special thanks to Martin Holters and his amazing circuit emulation tool ACME for the great work on circuit emulation and answering my questions when I got stuck.

The fast version is optimized by removing unnecessary operations and replacing the general solver with an analytic solution of the specific model. At some point I’ll look into how a simd-optimized version would compare, since most of the operations are dot products anyway, but the current fast version is definitely fast enough for real-time use in DAW projects. Sadly convergence varies too much for using simd-lanes for processing left and right at the same time to bring a big performance benefit.

Implementations

Process a stereo sample.

Call this whenver the resonance or cutoff frequency of the FilterParams change.

Reset the filter.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.