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

This is a 2-pole lowpass filter.

This is a 2-pole lowpass filter loosely based on the one found in the second revision of the Korg MS20 synthesizer. It distorts really nicely and gets especially gnarly when resonance is high. My personal favorite.

It’s able to self-oscillate and starts doing so when its resonance is above 0.8.

OTA core, nonlinear op-amp buffers. Resonance is limited by a diode clipper, but it disappears quite quickly at high drives.

Its convergence is generally good, but it does get a bit slower at high drives. The parameter vector for the nonlinear contributions is just 2 entries long, meaning that it might be reasonable to create a lookup table to guarantee stable, fast runtime. <- not as reasonable as I thought, also needs entries for g and res

Circuit solved by Holters & Zölzer’s generalization of the DK-method.

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. pub struct SallenKey { filters: [SallenKeyCoreFast; 2], }

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.