Changed

abstract class supriya.tools.ugentools.Changed[source]

Triggers when a value changes.

>>> source = ugentools.In.ar(bus=0)
>>> changed = ugentools.Changed.ar(
...     source=source,
...     threshold=0,
...     )
>>> print(str(changed))
SynthDef 39e1f9d61589c4acaaf297cc961d65e4 {
    const_0:0.0 -> 0_In[0:bus]
    0_In[0] -> 1_HPZ1[0:source]
    1_HPZ1[0] -> 2_UnaryOpUGen:ABSOLUTE_VALUE[0:source]
    2_UnaryOpUGen:ABSOLUTE_VALUE[0] -> 3_BinaryOpUGen:GREATER_THAN[0:left]
    const_0:0.0 -> 3_BinaryOpUGen:GREATER_THAN[1:right]
}

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=2, group=1, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=2, group=1, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; } subgraph cluster_ugentools { graph [label=ugentools]; "supriya.tools.ugentools.Changed.Changed" [color=black, fontcolor=white, group=2, label=<<B>Changed</B>>, shape=oval, style="filled, rounded"]; "supriya.tools.ugentools.PseudoUGen.PseudoUGen" [color=3, group=2, label=PseudoUGen, shape=oval, style=bold]; "supriya.tools.ugentools.PseudoUGen.PseudoUGen" -> "supriya.tools.ugentools.Changed.Changed"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.ugentools.PseudoUGen.PseudoUGen"; }

Bases

Attribute summary

ar([source, threshold]) Constructs an audio-rate Changed.
kr([source, threshold]) Constructs a control-rate Changed.
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__hash__() Hashes Supriya object.
__repr__() Gets interpreter representation of Supriya object.

Class & static methods

classmethod Changed.ar(source=None, threshold=0)[source]

Constructs an audio-rate Changed.

>>> source = ugentools.In.ar(bus=0)
>>> changed = ugentools.Changed.ar(
...     source=source,
...     threshold=0,
...     )
>>> print(str(changed))
SynthDef 39e1f9d61589c4acaaf297cc961d65e4 {
    const_0:0.0 -> 0_In[0:bus]
    0_In[0] -> 1_HPZ1[0:source]
    1_HPZ1[0] -> 2_UnaryOpUGen:ABSOLUTE_VALUE[0:source]
    2_UnaryOpUGen:ABSOLUTE_VALUE[0] -> 3_BinaryOpUGen:GREATER_THAN[0:left]
    const_0:0.0 -> 3_BinaryOpUGen:GREATER_THAN[1:right]
}

Returns ugen graph.

classmethod Changed.kr(source=None, threshold=0)[source]

Constructs a control-rate Changed.

>>> source = ugentools.In.ar(bus=0)
>>> changed = ugentools.Changed.kr(
...     source=source,
...     threshold=0,
...     )
>>> print(str(changed))
SynthDef e2436271176995c6a0a5cac6d1553f8b {
    const_0:0.0 -> 0_In[0:bus]
    0_In[0] -> 1_HPZ1[0:source]
    1_HPZ1[0] -> 2_UnaryOpUGen:ABSOLUTE_VALUE[0:source]
    2_UnaryOpUGen:ABSOLUTE_VALUE[0] -> 3_BinaryOpUGen:GREATER_THAN[0:left]
    const_0:0.0 -> 3_BinaryOpUGen:GREATER_THAN[1:right]
}

Returns ugen graph.

Special methods

(SupriyaObject).__eq__(expr)

Is true when ID of expr equals ID of Supriya object. Otherwise false.

Returns boolean.

(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(SupriyaObject).__hash__()

Hashes Supriya object.

Required to be explicitely re-defined on Python 3 if __eq__ changes.

Returns integer.

(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.