A filter UGen to remove very low frequency content DC offset.
This is a one-pole highpass filter implementing the formula
y[n] = x[n] - x[n-1] + coeff * y[n-1]
===Examples===
// show DC with mouse-controlled coefficient
play {
val freq = 800
val in = LFPulse.ar(freq).mulAdd(0.5, 0.5)
val coef = MouseX.kr(0.9, 0.999)
val flt = LeakDC.ar(in, coef)
val dc = RunningSum.ar(flt, SampleRate.ir/freq)
coef.poll(2)
dc .poll(2)
0
}
- See also
- Companion
- class
Type members
Value members
Concrete methods
- Value Params
- coeff
the leak coefficient determines the filter strength. the value must be between zero and one (exclusive) for the filter to remain stable. values closer to one produce less bass attenuation.
- in
input signal to be filtered