36 lines
540 B
Text
36 lines
540 B
Text
|
class:: Changed
|
||
|
categories:: UGens>Triggers, UGens>Filters>Linear
|
||
|
summary:: Triggers when a value changes
|
||
|
|
||
|
description::
|
||
|
Triggers when a value changes.
|
||
|
|
||
|
classmethods::
|
||
|
method:: ar, kr
|
||
|
A special case fixed filter.
|
||
|
|
||
|
argument:: input
|
||
|
signal input
|
||
|
argument:: threshold
|
||
|
threshold
|
||
|
|
||
|
discussion::
|
||
|
Implements the formula:
|
||
|
code::
|
||
|
out(i) = abs(in(i) - in(i-1)) > thresh
|
||
|
::
|
||
|
|
||
|
examples::
|
||
|
|
||
|
detect changes in a signal:
|
||
|
code::
|
||
|
(
|
||
|
{
|
||
|
var changingSignal = LFNoise0.ar(1000);
|
||
|
var changed = Changed.ar(changingSignal);
|
||
|
[changingSignal, changed]
|
||
|
}.plot2
|
||
|
);
|
||
|
::
|
||
|
|