A filter UGen that calculates the median of a running window over its input signal. This non-linear filter can be used to reduce impulse noise from a signal.
===Examples===
// engage with mouse button
play {
val in = Saw.ar(500) * 0.1 + Dust2.ar(100) * 0.9 // signal plus noise
val flt = Median.ar(in, 3)
LinXFade2.ar(in, flt, MouseButton.kr(-1, 1))
}
// long filter distorts by chopping off peaks in input
play { Median.ar(SinOsc.ar(1000) * 0.2, 31) }
- See also
- Note
The argument order is different from its sclang counterpart.
- Companion
- class
Type members
Value members
Concrete methods
- Value Params
- length
window size. I.e., the number of input samples in which to find the median. Must be an odd number from 1 to 31. A value of 1 has no effect. ''Warning'': This parameter is only read an initialization time and cannot be modulated while the UGen is running. ''(init-time only)''