de.sciss.synth.ugen
A two point difference filter UGen. Implements the formula :
out(i) = 0.5 * (in(i) - in(i-1))
Note: the filter's memory is initialized with the first input sample, so for HPZ1.ar(DC.ar(x)) the output will be zero, even at the beginning.
Note:
HPZ1.ar(DC.ar(x))
// engage with mouse button play { val sig = PinkNoise.ar val flt = HPZ1.ar(sig) LinXFade2.ar(sig, flt, MouseButton.kr(-1, 1)) }
// detect changes play { val z = LFNoise0.ar(2) val f = HPZ1.ar(z) val ch = f sig_!= 0 // input increased or decreased z.poll(ch, "now") 0 }
Delay1
LPZ1
OneZero
input signal to be filtered
A two point difference filter UGen. Implements the formula :
the filter's memory is initialized with the first input sample, so forNote:
HPZ1.ar(DC.ar(x))
the output will be zero, even at the beginning.Examples
Delay1
LPZ1
OneZero