2 summary:: Schmidt trigger.
3 related:: Classes/InRange, Classes/InRect
4 categories:: UGens>Maths
9 When code::in:: crosses to greater than
10 code::hi:: , output 1, then when signal crosses lower
11 than code::lo:: output 0. Uses the formula:
15 if (out == 1, { if (in < lo, { out = 0.0 }) }, { if (in > hi, { out = 1.0 }) }).
19 Output is initially zero.
47 { Schmidt.kr(SinOsc.kr(1, 0, 0.2), -0.15, 0.15)}.scope; // see the trigger
49 { Schmidt.kr(MouseX.kr(0, 1), 0.2, 0.8)}.scope; // try it with the cursor
51 // threshold octave jumps
54 var in = LFNoise1.kr(3);
55 var octave = Schmidt.kr(in, -0.15, 0.15) + 1;
56 SinOsc.ar(in * 200 + 500 * octave, 0, 0.1)