MedianTriggered:
Filter:
Classes (extension) | UGens > Filters

MedianTriggered : Filter : PureUGen : UGen : AbstractFunction : Object
ExtensionExtension

Median of recent values, triggered

Description

Calculates the median of the most recent length values, but only paying attention to values input while the trigger is greater than zero. One application of this is to calculate a running median of values coming from FFT analysis.

While trig<=0, the last-measured median is held constant.

The length argument is set at initialisation, and cannot be modulated. The length is directly reflected in the amount of real-time memory taken by this UGen, so please think carefully before using large values of length. Values in the low single- or double-figures are expected.

The median is implemented using a simple "selection sort", which is another argument against using large values for length since the performance is not tailored for large collections.

Class Methods

Inherited class methods

Undocumented class methods

MedianTriggered.ar(in: 0.0, trig: 0.0, length: 10, mul: 1.0, add: 0.0)

MedianTriggered.kr(in: 0.0, trig: 0.0, length: 10, mul: 1.0, add: 0.0)

Instance Methods

Inherited instance methods

Examples