Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / Classes / HPZ1.schelp
blob0a1b29a8a1dfd35cde74a765ab13c2235d963cb9
1 class:: HPZ1
2 summary:: Two point difference filter
3 related:: Classes/LPZ1, Classes/HPZ2
4 categories::  UGens>Filters>Linear
7 Description::
9 A special case fixed filter. Implements the formula:
11 code::
12 out(i) = 0.5 * (in(i) - in(i-1))
15 Which is a two point differentiator.
18 classmethods::
20 method::ar, kr
22 argument::in
24 The input signal.
27 argument::mul
29 Output will be multiplied by this value.
32 argument::add
34 This value will be added to the output.
37 Examples::
39 code::
40 // Compare:
42 { WhiteNoise.ar(0.25) }.play;
44 { HPZ1.ar(WhiteNoise.ar(0.25)) }.play;
46 // HPZ1 is useful to detect changes in a signal:
47 // see also HPZ2
50         var changingSignal = LFNoise0.ar(1000);
51         var hpz1 = HPZ1.ar(changingSignal);
52         [hpz1, hpz1 > 0, hpz1.abs > 0]
53 }.plot