Crackle

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph cluster_builtins { graph [label=builtins]; node [color=1]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } subgraph "cluster_supriya.synthdefs" { graph [label="supriya.synthdefs"]; node [color=2]; "supriya.synthdefs.UGenMethodMixin.UGenMethodMixin" [URL="../api/supriya/ugens/../synthdefs/UGenMethodMixin.html#supriya.synthdefs.UGenMethodMixin.UGenMethodMixin", label="UGen\nMethod\nMixin", target=_top]; } subgraph "cluster_supriya.system" { graph [label="supriya.system"]; node [color=3]; "supriya.system.SupriyaObject.SupriyaObject" [URL="../api/supriya/ugens/../system/SupriyaObject.html#supriya.system.SupriyaObject.SupriyaObject", label="Supriya\nObject", target=_top]; } subgraph "cluster_supriya.ugens" { graph [label="supriya.ugens"]; node [color=4]; "supriya.ugens.Crackle.Crackle" [URL="../api/supriya/ugens/Crackle.html#supriya.ugens.Crackle.Crackle", color=black, fontcolor=white, label=Crackle, target=_top]; "supriya.ugens.UGen.UGen" [URL="../api/supriya/ugens/UGen.html#supriya.ugens.UGen.UGen", label=UGen, shape=oval, style=bold, target=_top]; "supriya.ugens.UGen.UGen" -> "supriya.ugens.Crackle.Crackle"; } "builtins.object" -> "supriya.system.SupriyaObject.SupriyaObject"; "supriya.synthdefs.UGenMethodMixin.UGenMethodMixin" -> "supriya.ugens.UGen.UGen"; "supriya.system.SupriyaObject.SupriyaObject" -> "supriya.synthdefs.UGenMethodMixin.UGenMethodMixin"; }

class supriya.ugens.Crackle.Crackle(calculation_rate=None, chaos_parameter=1.5)[source]

A chaotic noise generator.

>>> crackle = supriya.ugens.Crackle.ar(
...     chaos_parameter=1.25,
...     )
>>> crackle
Crackle.ar()

Attributes Summary

ar Constructs a audio-rate Crackle unit generator graph.
chaos_parameter Gets chaos_parameter of Crackle.
kr Constructs a control-rate Crackle unit generator graph.

Special methods

(UGenMethodMixin).__abs__()

Gets absolute value of ugen graph.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = abs(ugen_graph)
>>> result
UnaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: f21696d155a2686700992f0e9a04a79c
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(ABSOLUTE_VALUE).ar:
            source: WhiteNoise.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=(440, 442, 443),
...     )
>>> result = abs(ugen_graph)
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 1d45df2f3d33d1b0641d2c464498f6c4
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   UnaryOpUGen(ABSOLUTE_VALUE).ar/0:
            source: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   UnaryOpUGen(ABSOLUTE_VALUE).ar/1:
            source: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   UnaryOpUGen(ABSOLUTE_VALUE).ar/2:
            source: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__add__(expr)

Adds expr to ugen graph.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph + expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 6bf4339326d015532b7604cd7af9ad3b
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph + expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: f4a3c1ed35cc5f6fe66b70a3bc520b10
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph + expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: f79088cc154ef2b65c72a0f8de8336ce
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(ADDITION).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__div__(expr)

Divides ugen graph by expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 6da024a346859242c441fe03326d2adc
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph / expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: be20d589dfccb721f56da8b002d86763
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 672765c596fcaa083186b2f2b996ba1d
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__ge__(expr)

Tests if ugen graph if greater than or equal to expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph >= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 9db96233abf1f610d027ff285691482d
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN_OR_EQUAL).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph >= expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 6d43342b3787aa11a46cea54412407e1
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN_OR_EQUAL).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN_OR_EQUAL).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN_OR_EQUAL).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph >= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: b06931195bab8e6f6ca2e3a857e71a95
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(GREATER_THAN_OR_EQUAL).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGen).__getitem__(i)

Gets output proxy at index i.

>>> ugen = supriya.ugens.SinOsc.ar()
>>> ugen[0]
SinOsc.ar()[0]

Returns output proxy.

(UGenMethodMixin).__graph__()

Gets Graphviz representation of ugen graph.

Returns GraphvizGraph instance.

(UGenMethodMixin).__gt__(expr)

Tests if ugen graph if greater than expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph > expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 01bebf935112af62ffdd282a99581904
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph > expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 55642179864ad927e9d5cf6358367677
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(GREATER_THAN).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph > expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 5177e03443ad31ee2664aae2201fb979
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(GREATER_THAN).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__le__(expr)

Tests if ugen graph if less than or equal to expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph <= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: fefc06cbbc3babb35046306c6d41e3c5
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN_OR_EQUAL).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph <= expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 53f29d793fd676fbca1d541e938b66ca
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN_OR_EQUAL).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN_OR_EQUAL).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN_OR_EQUAL).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph <= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 3cf0414af96d130edf2e1b839f73036c
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(LESS_THAN_OR_EQUAL).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGen).__len__()

Gets number of ugen outputs.

Returns integer.

(UGenMethodMixin).__lt__(expr)

Tests if ugen graph if less than expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph < expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 844f34c0ffb28ecc24bd5cf0bae20b43
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph < expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 14c1494fe4e153e690a8ef0a42e5834f
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(LESS_THAN).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph < expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: e87d41791847aa80d8a3e56318e506e4
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(LESS_THAN).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__mod__(expr)

Gets modulo of ugen graph and expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph % expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: e4a06e157474f8d1ae213916f3cf585a
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(MODULO).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph % expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 90badce1cf8fc1752b5eb99b29122a14
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(MODULO).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(MODULO).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(MODULO).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph % expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: bfa60877061daf112516cc3ec8c7ff69
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(MODULO).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__mul__(expr)

Multiplies ugen graph by expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph * expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: ea2b5e5cec4e2d5a1bef0a8dda522bd3
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph * expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 9d353c198344b6be3635244197bc2a4b
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph * expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 1735acd4add428d8ab317d00236b0fe7
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(MULTIPLICATION).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__neg__()

Negates ugen graph.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = -ugen_graph
>>> result
UnaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: a987a13f0593e4e4e070acffb11d5c3e
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(NEGATIVE).ar:
            source: WhiteNoise.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=(440, 442, 443),
...     )
>>> result = -ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: e5dfc1d4ecb11ed8170aaf11469a6443
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   UnaryOpUGen(NEGATIVE).ar/0:
            source: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   UnaryOpUGen(NEGATIVE).ar/1:
            source: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   UnaryOpUGen(NEGATIVE).ar/2:
            source: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__pow__(expr)

Raises ugen graph to the power of expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph ** expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 3498b370c0575fb2c2ed45143ba2da4f
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph ** expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 04e78034682f9ffd6628fbfd09a28c13
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph ** expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 50b8e3b154bc85c98d76ced493a32731
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(POWER).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__radd__(expr)

Adds ugen graph to expr.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr + ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: bb0592fad58b0bfa1a403c7ff6a400f3
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr + ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 0ad0a3d4b7ddf8bb56807813efc62202
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(ADDITION).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__rdiv__(expr)

Divides expr by ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr / ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: d79490206a430281b186b188d617f679
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr / ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: d71b3081490f800d5136c87f5fef46d1
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGen).__repr__()

Gets interpreter representation of ugen.

>>> ugen = supriya.ugens.SinOsc.ar()
>>> repr(ugen)
'SinOsc.ar()'
>>> ugen = supriya.ugens.WhiteNoise.kr()
>>> repr(ugen)
'WhiteNoise.kr()'
>>> ugen = supriya.ugens.Rand.ir()
>>> repr(ugen)
'Rand.ir()'

Returns string.

(UGenMethodMixin).__rmod__(expr)

Gets modulo of expr and ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr % ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: d79490206a430281b186b188d617f679
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr % ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: d71b3081490f800d5136c87f5fef46d1
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__rmul__(expr)

Multiplies expr by ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr * ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: f60bbe0480298a7ae8b54de5a4c0260f
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr * ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 0295153106bff55a2bf6db3b7184d301
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(MULTIPLICATION).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__rpow__(expr)

Raises expr to the power of ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr ** ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: c450618c9e0fe5213629275da4e5e354
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr ** ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: a614dc68313ee7ca2677e63fd499de0d
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(POWER).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__rsub__(expr)

Subtracts ugen graph from expr.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr - ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 74e331121aa41f4d49a6d38a38ca4a9a
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr - ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 1ca2e8f3f541b9365413a0dbf9028e95
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__rtruediv__(expr)

Divides expr by ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> result = expr / ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: d79490206a430281b186b188d617f679
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: 1.5
            right: SinOsc.ar[0]

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr / ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: d71b3081490f800d5136c87f5fef46d1
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/0:
            left: 220.0
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/1:
            left: 330.0
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/2:
            left: 220.0
            right: SinOsc.ar/2[0]

Returns ugen graph.

(UGenMethodMixin).__str__()

Gets string representation of ugen graph.

>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> print(str(ugen_graph))
synthdef:
    name: c9b0ed62d4e0666b74166ff5ec09abe4
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
>>> ugen_graph = supriya.ugens.SinOsc.ar(frequency=[1, 2, 3])
>>> print(str(ugen_graph))
synthdef:
    name: 4015dac116b25c54b4a6f02bcb5859cb
    ugens:
    -   SinOsc.ar/0:
            frequency: 1.0
            phase: 0.0
    -   SinOsc.ar/1:
            frequency: 2.0
            phase: 0.0
    -   SinOsc.ar/2:
            frequency: 3.0
            phase: 0.0

Returns string.

(UGenMethodMixin).__sub__(expr)

Subtracts expr from ugen graph.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph - expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: cd62fff8ff3ad7758d0f7ad82f39c7ce
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph - expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: 9a8355f84507908cadf3cc63187ddab4
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(SUBTRACTION).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph - expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 48ca704043ed00a2b6a55fd4b6b72cf1
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(SUBTRACTION).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.

(UGenMethodMixin).__truediv__(expr)

Divides ugen graph by expr.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar()
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 6da024a346859242c441fe03326d2adc
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.WhiteNoise.kr()
>>> expr = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph / expr
>>> result
UGenArray({3})
>>> graph(result)  
>>> print(result)
synthdef:
    name: be20d589dfccb721f56da8b002d86763
    ugens:
    -   WhiteNoise.kr: null
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/0:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/1:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   BinaryOpUGen(FLOAT_DIVISION).ar/2:
            left: WhiteNoise.kr[0]
            right: SinOsc.ar/2[0]

Example 3:

>>> ugen_graph = supriya.ugens.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 672765c596fcaa083186b2f2b996ba1d
    ugens:
    -   Dust.ar:
            density: 11.5
    -   BinaryOpUGen(FLOAT_DIVISION).ar:
            left: Dust.ar[0]
            right: 4.0

Returns ugen graph.


Methods

(UGenMethodMixin).absolute_difference(expr)

Calculates absolute difference between ugen graph and expr.

>>> ugen_graph = supriya.ugens.SinOsc.ar()
>>> expr = supriya.ugens.WhiteNoise.kr()
>>> result = ugen_graph.absolute_difference(expr)
>>> graph(result)  
>>> print(result)
synthdef:
    name: a6b274b5f30e1dfa86ac1d00ef1c169b
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   WhiteNoise.kr: null
    -   BinaryOpUGen(ABSOLUTE_DIFFERENCE).ar:
            left: SinOsc.ar[0]
            right: WhiteNoise.kr[0]

Returns ugen graph.

(UGenMethodMixin).amplitude_to_db()

Converts ugen graph from amplitude to decibels.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.amplitude_to_db()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 73daa5fd8db0d28c03c3872c845fd3ed
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(AMPLITUDE_TO_DB).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).as_int()
(UGenMethodMixin).ceiling()

Calculates the ceiling of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.ceiling()
>>> print(operation)
synthdef:
    name: c7b1855219f3364f731bdd2e4599b1d1
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(CEILING).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).clip(minimum, maximum)

Clips ugen graph.

Example 1:

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.clip(-0.25, 0.25)
>>> graph(result)  
>>> print(result)
synthdef:
    name: e710843b0e0fbc5e6185afc6cdf90149
    ugens:
    -   WhiteNoise.ar: null
    -   Clip.ar:
            maximum: 0.25
            minimum: -0.25
            source: WhiteNoise.ar[0]

Example 2:

>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph.clip(-0.25, 0.25)
>>> graph(result)  
>>> print(result)
synthdef:
    name: 000e997ea0d7e8637c9f9040547baa50
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   Clip.ar/0:
            maximum: 0.25
            minimum: -0.25
            source: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   Clip.ar/1:
            maximum: 0.25
            minimum: -0.25
            source: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   Clip.ar/2:
            maximum: 0.25
            minimum: -0.25
            source: SinOsc.ar/2[0]
(UGenMethodMixin).cubed()

Calculates the cube of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.cubed()
>>> print(operation)
synthdef:
    name: ad344666e7f3f60edac95b1ea40c412d
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(CUBED).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).db_to_amplitude()

Converts ugen graph from decibels to amplitude.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.db_to_amplitude()
>>> graph(result)  
>>> print(result)
synthdef:
    name: fe82aae42b01b2b43d427cafd77c1c22
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(DB_TO_AMPLITUDE).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).distort()

Distorts ugen graph non-linearly.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.distort()
>>> print(operation)
synthdef:
    name: bb632e15f448820d93b3880ad943617b
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(DISTORT).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).exponential()

Calculates the natural exponential function of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.exponential()
>>> print(operation)
synthdef:
    name: f3b8b1036b3cceddf116c3f6a3c5a9a0
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(EXPONENTIAL).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).exponential_range(minimum=0.01, maximum=1.0)
(UGenMethodMixin).floor()

Calculates the floor of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.floor()
>>> print(operation)
synthdef:
    name: 407228cfdb74bdd79b51c425fb8a7f77
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(FLOOR).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).fractional_part()

Calculates the fraction part of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.fractional_part()
>>> print(operation)
synthdef:
    name: c663d5ee6c7c5347c043727c628af658
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(FRACTIONAL_PART).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).hanning_window()

Calculates Hanning-window of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.hanning_window()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 18cb43db42ae3499f2c233e83df877fd
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(HANNING_WINDOW).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).hz_to_midi()

Converts ugen graph from Hertz to midi note number.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.hz_to_midi()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 227a6ae85bc89b3af939cff32f54e36a
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(HZ_TO_MIDI).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).hz_to_octave()

Converts ugen graph from Hertz to octave number.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.hz_to_octave()
>>> graph(result)  
>>> print(result)
synthdef:
    name: e4fd4ca786d453fc5dfb955c63b6fbf6
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(HZ_TO_OCTAVE).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).is_equal_to(expr)

Calculates equality between ugen graph and expr.

>>> left = supriya.ugens.SinOsc.ar()
>>> right = supriya.ugens.WhiteNoise.kr()
>>> operation = left.is_equal_to(right)
>>> print(operation)
synthdef:
    name: 8287d890708ce26adff4968d63d494a0
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   WhiteNoise.kr: null
    -   BinaryOpUGen(EQUAL).ar:
            left: SinOsc.ar[0]
            right: WhiteNoise.kr[0]

Returns ugen graph.

(UGenMethodMixin).is_not_equal_to(expr)

Calculates inequality between ugen graph and expr.

>>> left = supriya.ugens.SinOsc.ar()
>>> right = supriya.ugens.WhiteNoise.kr()
>>> operation = left.is_not_equal_to(right)
>>> print(operation)
synthdef:
    name: b9f77aa86bc08a3b023d8f664afef05d
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   WhiteNoise.kr: null
    -   BinaryOpUGen(NOT_EQUAL).ar:
            left: SinOsc.ar[0]
            right: WhiteNoise.kr[0]

Returns ugen graph.

(UGenMethodMixin).lag(lag_time=0.5)

Lags ugen graph.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.lag(0.5)
>>> graph(result)  
>>> print(result)
synthdef:
    name: 6c3e2cc1a3d54ecfaa49d567a84eae77
    ugens:
    -   WhiteNoise.ar: null
    -   Lag.ar:
            lag_time: 0.5
            source: WhiteNoise.ar[0]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph.lag(0.5)
>>> graph(result)  
>>> print(result)
synthdef:
    name: 67098a4ddab35f6e1333a80a226bf559
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   Lag.ar/0:
            lag_time: 0.5
            source: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   Lag.ar/1:
            lag_time: 0.5
            source: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   Lag.ar/2:
            lag_time: 0.5
            source: SinOsc.ar/2[0]
(UGenMethodMixin).log()

Calculates the natural logarithm of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.log()
>>> print(operation)
synthdef:
    name: 4da44dab9d935efd1cf098b4d7cec420
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(LOG).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).log10()

Calculates the base-10 logarithm of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.log10()
>>> print(operation)
synthdef:
    name: 122d9333b8ac76164782d00707d3386a
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(LOG10).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).log2()

Calculates the base-2 logarithm of ugen graph.

>>> source = supriya.ugens.DC.ar(source=0.5)
>>> operation = source.log2()
>>> print(operation)
synthdef:
    name: f956f79a387ffbeb409326046397b4dd
    ugens:
    -   DC.ar:
            source: 0.5
    -   UnaryOpUGen(LOG2).ar:
            source: DC.ar[0]

Returns ugen graph.

(UGenMethodMixin).maximum(expr)

Calculates maximum between ugen graph and expr.

>>> left = supriya.ugens.SinOsc.ar()
>>> right = supriya.ugens.WhiteNoise.kr()
>>> operation = left.maximum(right)
>>> print(operation)
synthdef:
    name: dcdca07fb0439c8b4321f42803d18c32
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   WhiteNoise.kr: null
    -   BinaryOpUGen(MAXIMUM).ar:
            left: SinOsc.ar[0]
            right: WhiteNoise.kr[0]

Returns ugen graph.

(UGenMethodMixin).midi_to_hz()

Converts ugen graph from midi note number to Hertz.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.midi_to_hz()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 5faaa2c74715175625d774b20952f263
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(MIDI_TO_HZ).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).minimum(expr)

Calculates minimum between ugen graph and expr.

>>> left = supriya.ugens.SinOsc.ar()
>>> right = supriya.ugens.WhiteNoise.kr()
>>> operation = left.minimum(right)
>>> print(operation)
synthdef:
    name: f80c0a7b300911e9eff0e8760f5fab18
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   WhiteNoise.kr: null
    -   BinaryOpUGen(MINIMUM).ar:
            left: SinOsc.ar[0]
            right: WhiteNoise.kr[0]

Returns ugen graph.

(UGenMethodMixin).octave_to_hz()

Converts ugen graph from octave number to Hertz.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.octave_to_hz()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 04c00b0f32088eb5e4cef0549aed6d96
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(OCTAVE_TO_HZ).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).power(expr)

Raises ugen graph to the power of expr.

>>> left = supriya.ugens.SinOsc.ar()
>>> right = supriya.ugens.WhiteNoise.kr()
>>> operation = left.power(right)
>>> print(operation)
synthdef:
    name: 06d6d3fe992bff8fce9ef55db6863c2a
    ugens:
    -   SinOsc.ar:
            frequency: 440.0
            phase: 0.0
    -   WhiteNoise.kr: null
    -   BinaryOpUGen(POWER).ar:
            left: SinOsc.ar[0]
            right: WhiteNoise.kr[0]

Returns ugen graph.

(UGenMethodMixin).range(minimum=0.0, maximum=1.0)
(UGenMethodMixin).ratio_to_semitones()

Converts ugen graph from frequency ratio to semitone distance.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.ratio_to_semitones()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 2e23630ade4fab35fc821c190b7f33db
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(RATIO_TO_SEMITONES).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).reciprocal()

Calculates reciprocal of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.reciprocal()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 2e1c714d0def9d5c310197861d725559
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(RECIPROCAL).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).rectangle_window()

Calculates rectangle-window of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.rectangle_window()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 0d296187bbdb205f3a283f301a5fad61
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(RECTANGLE_WINDOW).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).s_curve()

Calculates S-curve of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.s_curve()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 21bcaf49922e2c4124d4cadba85c00ac
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(S_CURVE).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).scale(input_minimum, input_maximum, output_minimum, output_maximum, exponential=False)

Scales ugen graph from input_minimum and input_maximum to output_minimum and output_maximum.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.scale(-1, 1, 0.5, 0.75)
>>> graph(result)  
>>> print(result)
synthdef:
    name: e2295e64ed7b9c949ec22ccdc82520e3
    ugens:
    -   WhiteNoise.ar: null
    -   MulAdd.ar:
            addend: 0.625
            multiplier: 0.125
            source: WhiteNoise.ar[0]
>>> ugen_graph = supriya.ugens.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph.scale(-1, 1, 0.5, 0.75, exponential=True)
>>> graph(result)  
>>> print(result)
synthdef:
    name: 88dca305143542bd40a82d8a6a337306
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   LinExp.ar/0:
            input_maximum: 1.0
            input_minimum: -1.0
            output_maximum: 0.75
            output_minimum: 0.5
            source: SinOsc.ar/0[0]
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   LinExp.ar/1:
            input_maximum: 1.0
            input_minimum: -1.0
            output_maximum: 0.75
            output_minimum: 0.5
            source: SinOsc.ar/1[0]
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   LinExp.ar/2:
            input_maximum: 1.0
            input_minimum: -1.0
            output_maximum: 0.75
            output_minimum: 0.5
            source: SinOsc.ar/2[0]
(UGenMethodMixin).semitones_to_ratio()

Converts ugen graph from semitone distance to frequency ratio.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.semitones_to_ratio()
>>> graph(result)  
>>> print(result)
synthdef:
    name: f77ac2c24b06f8e620817f14285c2877
    ugens:
    -   WhiteNoise.ar: null
    -   UnaryOpUGen(SEMITONES_TO_RATIO).ar:
            source: WhiteNoise.ar[0]

Returns ugen graph.

(UGenMethodMixin).sign()

Calculates sign of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.sign()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 6f62abd8306dbf1aae66c09dd98203b5
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(SIGN).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).softclip()

Distorts ugen graph non-linearly.

(UGenMethodMixin).square_root()

Calculates square root of ugen graph.

(UGenMethodMixin).squared()

Calculates square of ugen graph.

(UGenMethodMixin).sum()

Sums ugen graph.

Example 1:

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.sum()
>>> graph(result)  
>>> print(result)
synthdef:
    name: 350f2065d4edc69244399dcaff5a1ceb
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0

Example 2:

>>> ugen_graph = supriya.ugens.SinOsc.ar([440, 442, 443])
>>> result = ugen_graph.sum()
>>> graph(result)  
>>> print(result)
synthdef:
    name: a1d26283f87b8b445db982ff0e831fb7
    ugens:
    -   SinOsc.ar/0:
            frequency: 440.0
            phase: 0.0
    -   SinOsc.ar/1:
            frequency: 442.0
            phase: 0.0
    -   SinOsc.ar/2:
            frequency: 443.0
            phase: 0.0
    -   Sum3.ar:
            input_one: SinOsc.ar/0[0]
            input_three: SinOsc.ar/2[0]
            input_two: SinOsc.ar/1[0]

Returns ugen graph.

(UGenMethodMixin).tanh()

Calculates hyperbolic tangent of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.tanh()
>>> graph(result)  
>>> print(result)
synthdef:
    name: e74aa9abf6e389d8ca39d2c9828d81be
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(TANH).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).transpose(semitones)

Transposes ugen graph by semitones.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.transpose([0, 3, 7])
>>> graph(result)  
>>> print(result)
synthdef:
    name: c481c3d42e3cfcee0267250247dab51f
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(HZ_TO_MIDI).ar:
            source: LFNoise2.ar[0]
    -   UnaryOpUGen(MIDI_TO_HZ).ar/0:
            source: UnaryOpUGen(HZ_TO_MIDI).ar[0]
    -   BinaryOpUGen(ADDITION).ar/0:
            left: UnaryOpUGen(HZ_TO_MIDI).ar[0]
            right: 3.0
    -   UnaryOpUGen(MIDI_TO_HZ).ar/1:
            source: BinaryOpUGen(ADDITION).ar/0[0]
    -   BinaryOpUGen(ADDITION).ar/1:
            left: UnaryOpUGen(HZ_TO_MIDI).ar[0]
            right: 7.0
    -   UnaryOpUGen(MIDI_TO_HZ).ar/2:
            source: BinaryOpUGen(ADDITION).ar/1[0]

Returns ugen graph.

(UGenMethodMixin).triangle_window()

Calculates triangle-window of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.triangle_window()
>>> graph(result)  
>>> print(result)
synthdef:
    name: ebb1820b9d08a639565b5090b53681db
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(TRIANGLE_WINDOW).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.

(UGenMethodMixin).welch_window()

Calculates Welch-window of ugen graph.

>>> ugen_graph = supriya.ugens.LFNoise2.ar()
>>> result = ugen_graph.welch_window()
>>> graph(result)  
>>> print(result)
synthdef:
    name: ...
    ugens:
    -   LFNoise2.ar:
            frequency: 500.0
    -   UnaryOpUGen(WELCH_WINDOW).ar:
            source: LFNoise2.ar[0]

Returns ugen graph.


Class & static methods

classmethod ar(chaos_parameter=1.5)

Constructs a audio-rate Crackle unit generator graph.

Returns unit generator graph.

classmethod kr(chaos_parameter=1.5)

Constructs a control-rate Crackle unit generator graph.

Returns unit generator graph.


Read-only properties

(UGen).calculation_rate

Gets calculation-rate of ugen.

>>> ugen = supriya.ugens.SinOsc.ar(
...     frequency=supriya.ugens.WhiteNoise.kr(),
...     phase=0.5,
...     )
>>> ugen.calculation_rate
CalculationRate.AUDIO

Returns calculation-rate.

chaos_parameter

Gets chaos_parameter of Crackle.

Returns input.

(UGen).has_done_flag
(UGen).inputs

Gets inputs of ugen.

>>> ugen = supriya.ugens.SinOsc.ar(
...     frequency=supriya.ugens.WhiteNoise.kr(),
...     phase=0.5,
...     )
>>> for input_ in ugen.inputs:
...     input_
...
WhiteNoise.kr()[0]
0.5

Returns tuple.

(UGen).is_input_ugen
(UGen).is_output_ugen
(UGen).outputs

Gets outputs of ugen.

>>> ugen = supriya.ugens.SinOsc.ar(
...     frequency=supriya.ugens.WhiteNoise.kr(),
...     phase=0.5,
...     )
>>> ugen.outputs
(CalculationRate.AUDIO,)

Returns tuple.

(UGen).signal_range

Gets signal range of ugen.

>>> ugen = supriya.ugens.SinOsc.ar()
>>> ugen.signal_range
SignalRange.BIPOLAR

A bipolar signal range indicates that the ugen generates signals above and below zero.

A unipolar signal range indicates that the ugen only generates signals of 0 or greater.

Returns signal range.

(UGen).special_index

Gets special index of ugen.

>>> ugen = supriya.ugens.SinOsc.ar(
...     frequency=supriya.ugens.WhiteNoise.kr(),
...     phase=0.5,
...     )
>>> ugen.special_index
0

The special index of most ugens will be 0. SuperColliders’s synth definition file format uses the special index to store the operator id for binary and unary operator ugens, and the parameter index of controls.

Returns integer.