RandSeed

class supriya.tools.ugentools.RandSeed(calculation_rate=None, seed=56789, trigger=0)[source]

Sets the synth’s random generator seed.

>>> trigger = ugentools.Impulse.ar()
>>> rand_seed = ugentools.RandSeed.ar(
...     seed=1,
...     trigger=trigger,
...     )
>>> rand_seed
RandSeed.ar()

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_synthdeftools { graph [label=synthdeftools]; "supriya.tools.synthdeftools.UGenMethodMixin.UGenMethodMixin" [color=2, group=1, label=UGenMethodMixin, shape=box]; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; } subgraph cluster_ugentools { graph [label=ugentools]; "supriya.tools.ugentools.RandSeed.RandSeed" [color=black, fontcolor=white, group=3, label=<<B>RandSeed</B>>, shape=box, style="filled, rounded"]; "supriya.tools.ugentools.UGen.UGen" [color=4, group=3, label=UGen, shape=oval, style=bold]; "supriya.tools.ugentools.WidthFirstUGen.WidthFirstUGen" [color=4, group=3, label=WidthFirstUGen, shape=oval, style=bold]; "supriya.tools.ugentools.UGen.UGen" -> "supriya.tools.ugentools.WidthFirstUGen.WidthFirstUGen"; "supriya.tools.ugentools.WidthFirstUGen.WidthFirstUGen" -> "supriya.tools.ugentools.RandSeed.RandSeed"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.synthdeftools.UGenMethodMixin.UGenMethodMixin" -> "supriya.tools.ugentools.UGen.UGen"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.synthdeftools.UGenMethodMixin.UGenMethodMixin"; }

Attribute summary

absolute_difference(expr) Calculates absolute difference between ugen graph and expr.
amplitude_to_db() Converts ugen graph from amplitude to decibels.
ar([seed, trigger]) Constructs an audio-rate RandSeed.
as_int()
calculation_rate Gets calculation-rate of ugen.
ceiling() Calculates the ceiling of ugen graph.
clip(minimum, maximum) Clips ugen graph.
cubed() Calculates the cube of ugen graph.
db_to_amplitude() Converts ugen graph from decibels to amplitude.
distort() Distorts ugen graph non-linearly.
exponential() Calculates the natural exponential function of ugen graph.
floor() Calculates the floor of ugen graph.
fractional_part() Calculates the fraction part of ugen graph.
hanning_window() Calculates Hanning-window of ugen graph.
has_done_flag
hz_to_midi() Converts ugen graph from Hertz to midi note number.
hz_to_octave() Converts ugen graph from Hertz to octave number.
inputs Gets inputs of ugen.
ir([seed, trigger]) Constructs a scalar-rate RandSeed.
is_equal_to(expr) Calculates equality between ugen graph and expr.
is_input_ugen
is_not_equal_to(expr) Calculates inequality between ugen graph and expr.
is_output_ugen
kr([seed, trigger]) Constructs a control-rate RandSeed.
lag([lag_time]) Lags ugen graph.
log() Calculates the natural logarithm of ugen graph.
log10() Calculates the base-10 logarithm of ugen graph.
log2() Calculates the base-2 logarithm of ugen graph.
maximum(expr) Calculates maximum between ugen graph and expr.
midi_to_hz() Converts ugen graph from midi note number to Hertz.
minimum(expr) Calculates minimum between ugen graph and expr.
octave_to_hz() Converts ugen graph from octave number to Hertz.
outputs Gets outputs of ugen.
power(expr) Raises ugen graph to the power of expr.
ratio_to_semitones() Converts ugen graph from frequency ratio to semitone distance.
reciprocal() Calculates reciprocal of ugen graph.
rectangle_window() Calculates rectangle-window of ugen graph.
s_curve() Calculates S-curve of ugen graph.
scale(input_minimum, input_maximum, ...[, ...]) Scales ugen graph from input_minimum and input_maximum to output_minimum and output_maximum.
seed Gets seed input of RandSeed.
semitones_to_ratio() Converts ugen graph from semitone distance to frequency ratio.
sign() Calculates sign of ugen graph.
signal_range Gets signal range of ugen.
softclip() Distorts ugen graph non-linearly.
special_index Gets special index of ugen.
square_root() Calculates square root of ugen graph.
squared() Calculates square of ugen graph.
sum() Sums ugen graph.
tanh() Calculates hyperbolic tangent of ugen graph.
transpose(semitones) Transposes ugen graph by semitones.
triangle_window() Calculates triangle-window of ugen graph.
trigger Gets trigger input of RandSeed.
welch_window() Calculates Welch-window of ugen graph.
__abs__() Gets absolute value of ugen graph.
__add__(expr) Adds expr to ugen graph.
__div__(expr) Divides ugen graph by expr.
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__ge__(expr) Tests if ugen graph if greater than or equal to expr.
__getitem__(i) Gets output proxy at index i.
__graph__() Gets Graphviz representation of ugen graph.
__gt__(expr) Tests if ugen graph if greater than expr.
__hash__() Hashes Supriya object.
__le__(expr) Tests if ugen graph if less than or equal to expr.
__len__() Gets number of ugen outputs.
__lt__(expr) Tests if ugen graph if less than expr.
__mod__(expr) Gets modulo of ugen graph and expr.
__mul__(expr) Multiplies ugen graph by expr.
__neg__() Negates ugen graph.
__pow__(expr) Raises ugen graph to the power of expr.
__radd__(expr) Adds ugen graph to expr.
__rdiv__(expr) Divides expr by ugen graph.
__repr__() Gets interpreter representation of ugen.
__rmod__(expr) Gets modulo of expr and ugen graph.
__rmul__(expr) Multiplies expr by ugen graph.
__rpow__(expr) Raises expr to the power of ugen graph.
__rsub__(expr) Subtracts ugen graph from expr.
__rtruediv__(expr) Divides expr by ugen graph.
__str__() Gets string format of ugen.
__sub__(expr) Subtracts expr from ugen graph.
__truediv__(expr) Divides ugen graph by expr.

Read-only properties

(UGen).calculation_rate

Gets calculation-rate of ugen.

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

Returns calculation-rate.

(UGen).has_done_flag
(UGen).inputs

Gets inputs of ugen.

>>> ugen = ugentools.SinOsc.ar(
...     frequency=ugentools.WhiteNoise.kr(),
...     phase=0.5,
...     )
>>> for input_ in ugen.inputs:
...     input_
...
OutputProxy(
    source=WhiteNoise(
        calculation_rate=CalculationRate.CONTROL
        ),
    output_index=0
    )
0.5

Returns tuple.

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

Gets outputs of ugen.

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

Returns tuple.

RandSeed.seed

Gets seed input of RandSeed.

>>> trigger = ugentools.Impulse.ar()
>>> rand_seed = ugentools.RandSeed.ar(
...     seed=1,
...     trigger=trigger,
...     )
>>> rand_seed.seed
1.0

Returns ugen input.

(UGen).signal_range

Gets signal range of ugen.

>>> ugen = ugentools.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 = ugentools.SinOsc.ar(
...     frequency=ugentools.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.

RandSeed.trigger

Gets trigger input of RandSeed.

>>> trigger = ugentools.Impulse.ar()
>>> rand_seed = ugentools.RandSeed.ar(
...     seed=1,
...     trigger=trigger,
...     )
>>> rand_seed.trigger
OutputProxy(
    source=Impulse(
        calculation_rate=CalculationRate.AUDIO,
        frequency=440.0,
        phase=0.0
        ),
    output_index=0
    )

Returns ugen input.

Methods

(UGenMethodMixin).absolute_difference(expr)

Calculates absolute difference between ugen graph and expr.

>>> ugen_graph = ugentools.SinOsc.ar()
>>> expr = ugentools.WhiteNoise.kr()
>>> result = ugen_graph.absolute_difference(expr)
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).amplitude_to_db()

Converts ugen graph from amplitude to decibels.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.amplitude_to_db()
>>> graph(result)  

Returns ugen graph.

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

Calculates the ceiling of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.ceiling()
>>> print(operation)
SynthDef c7b1855219f3364f731bdd2e4599b1d1 {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:CEILING[0:source]
}

Returns ugen graph.

(UGenMethodMixin).clip(minimum, maximum)

Clips ugen graph.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.clip(-0.25, 0.25)
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph.clip(-0.25, 0.25)
>>> graph(result)  
(UGenMethodMixin).cubed()

Calculates the cube of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.cubed()
>>> print(operation)
SynthDef ad344666e7f3f60edac95b1ea40c412d {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:CUBED[0:source]
}

Returns ugen graph.

(UGenMethodMixin).db_to_amplitude()

Converts ugen graph from decibels to amplitude.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.db_to_amplitude()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).distort()

Distorts ugen graph non-linearly.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.distort()
>>> print(operation)
SynthDef bb632e15f448820d93b3880ad943617b {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:DISTORT[0:source]
}

Returns ugen graph.

(UGenMethodMixin).exponential()

Calculates the natural exponential function of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.exponential()
>>> print(operation)
SynthDef f3b8b1036b3cceddf116c3f6a3c5a9a0 {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:EXPONENTIAL[0:source]
}

Returns ugen graph.

(UGenMethodMixin).floor()

Calculates the floor of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.floor()
>>> print(operation)
SynthDef 407228cfdb74bdd79b51c425fb8a7f77 {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:FLOOR[0:source]
}

Returns ugen graph.

(UGenMethodMixin).fractional_part()

Calculates the fraction part of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.fractional_part()
>>> print(operation)
SynthDef c663d5ee6c7c5347c043727c628af658 {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:FRACTIONAL_PART[0:source]
}

Returns ugen graph.

(UGenMethodMixin).hanning_window()

Calculates Hanning-window of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.hanning_window()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).hz_to_midi()

Converts ugen graph from Hertz to midi note number.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.hz_to_midi()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).hz_to_octave()

Converts ugen graph from Hertz to octave number.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.hz_to_octave()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).is_equal_to(expr)

Calculates equality between ugen graph and expr.

>>> left = ugentools.SinOsc.ar()
>>> right = ugentools.WhiteNoise.kr()
>>> operation = left.is_equal_to(right)
>>> print(operation)
SynthDef 8287d890708ce26adff4968d63d494a0 {
    const_0:440.0 -> 0_SinOsc[0:frequency]
    const_1:0.0 -> 0_SinOsc[1:phase]
    0_SinOsc[0] -> 2_BinaryOpUGen:EQUAL[0:left]
    1_WhiteNoise[0] -> 2_BinaryOpUGen:EQUAL[1:right]
}

Returns ugen graph.

(UGenMethodMixin).is_not_equal_to(expr)

Calculates inequality between ugen graph and expr.

>>> left = ugentools.SinOsc.ar()
>>> right = ugentools.WhiteNoise.kr()
>>> operation = left.is_not_equal_to(right)
>>> print(operation)
SynthDef b9f77aa86bc08a3b023d8f664afef05d {
    const_0:440.0 -> 0_SinOsc[0:frequency]
    const_1:0.0 -> 0_SinOsc[1:phase]
    0_SinOsc[0] -> 2_BinaryOpUGen:NOT_EQUAL[0:left]
    1_WhiteNoise[0] -> 2_BinaryOpUGen:NOT_EQUAL[1:right]
}

Returns ugen graph.

(UGenMethodMixin).lag(lag_time=0.5)

Lags ugen graph.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.lag(0.5)
>>> graph(result)  
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph.lag(0.5)
>>> graph(result)  
(UGenMethodMixin).log()

Calculates the natural logarithm of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.log()
>>> print(operation)
SynthDef 4da44dab9d935efd1cf098b4d7cec420 {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:LOG[0:source]
}

Returns ugen graph.

(UGenMethodMixin).log10()

Calculates the base-10 logarithm of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.log10()
>>> print(operation)
SynthDef 122d9333b8ac76164782d00707d3386a {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:LOG10[0:source]
}

Returns ugen graph.

(UGenMethodMixin).log2()

Calculates the base-2 logarithm of ugen graph.

>>> source = ugentools.DC.ar(source=0.5)
>>> operation = source.log2()
>>> print(operation)
SynthDef f956f79a387ffbeb409326046397b4dd {
    const_0:0.5 -> 0_DC[0:source]
    0_DC[0] -> 1_UnaryOpUGen:LOG2[0:source]
}

Returns ugen graph.

(UGenMethodMixin).maximum(expr)

Calculates maximum between ugen graph and expr.

>>> left = ugentools.SinOsc.ar()
>>> right = ugentools.WhiteNoise.kr()
>>> operation = left.maximum(right)
>>> print(operation)
SynthDef dcdca07fb0439c8b4321f42803d18c32 {
    const_0:440.0 -> 0_SinOsc[0:frequency]
    const_1:0.0 -> 0_SinOsc[1:phase]
    0_SinOsc[0] -> 2_BinaryOpUGen:MAXIMUM[0:left]
    1_WhiteNoise[0] -> 2_BinaryOpUGen:MAXIMUM[1:right]
}

Returns ugen graph.

(UGenMethodMixin).midi_to_hz()

Converts ugen graph from midi note number to Hertz.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.midi_to_hz()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).minimum(expr)

Calculates minimum between ugen graph and expr.

>>> left = ugentools.SinOsc.ar()
>>> right = ugentools.WhiteNoise.kr()
>>> operation = left.minimum(right)
>>> print(operation)
SynthDef f80c0a7b300911e9eff0e8760f5fab18 {
    const_0:440.0 -> 0_SinOsc[0:frequency]
    const_1:0.0 -> 0_SinOsc[1:phase]
    0_SinOsc[0] -> 2_BinaryOpUGen:MINIMUM[0:left]
    1_WhiteNoise[0] -> 2_BinaryOpUGen:MINIMUM[1:right]
}

Returns ugen graph.

(UGenMethodMixin).octave_to_hz()

Converts ugen graph from octave number to Hertz.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.octave_to_hz()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).power(expr)

Raises ugen graph to the power of expr.

>>> left = ugentools.SinOsc.ar()
>>> right = ugentools.WhiteNoise.kr()
>>> operation = left.power(right)
>>> print(operation)
SynthDef 06d6d3fe992bff8fce9ef55db6863c2a {
    const_0:440.0 -> 0_SinOsc[0:frequency]
    const_1:0.0 -> 0_SinOsc[1:phase]
    0_SinOsc[0] -> 2_BinaryOpUGen:POWER[0:left]
    1_WhiteNoise[0] -> 2_BinaryOpUGen:POWER[1:right]
}

Returns ugen graph.

(UGenMethodMixin).ratio_to_semitones()

Converts ugen graph from frequency ratio to semitone distance.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.ratio_to_semitones()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).reciprocal()

Calculates reciprocal of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.reciprocal()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).rectangle_window()

Calculates rectangle-window of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.rectangle_window()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).s_curve()

Calculates S-curve of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.s_curve()
>>> graph(result)  

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 = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.scale(-1, 1, 0.5, 0.75)
>>> graph(result)  
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph.scale(-1, 1, 0.5, 0.75, exponential=True)
>>> graph(result)  
(UGenMethodMixin).semitones_to_ratio()

Converts ugen graph from semitone distance to frequency ratio.

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = ugen_graph.semitones_to_ratio()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).sign()

Calculates sign of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.sign()
>>> graph(result)  

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 = ugentools.LFNoise2.ar()
>>> result = ugen_graph.sum()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.SinOsc.ar([440, 442, 443])
>>> result = ugen_graph.sum()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).tanh()

Calculates hyperbolic tangent of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.tanh()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).transpose(semitones)

Transposes ugen graph by semitones.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.transpose([0, 3, 7])
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).triangle_window()

Calculates triangle-window of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.triangle_window()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).welch_window()

Calculates Welch-window of ugen graph.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.welch_window()
>>> graph(result)  

Returns ugen graph.

Class & static methods

classmethod RandSeed.ar(seed=56789, trigger=0)[source]

Constructs an audio-rate RandSeed.

>>> trigger = ugentools.Impulse.ar()
>>> rand_seed = ugentools.RandSeed.ar(
...     seed=1,
...     trigger=trigger,
...     )
>>> rand_seed
RandSeed.ar()

Returns ugen graph.

classmethod RandSeed.ir(seed=56789, trigger=0)[source]

Constructs a scalar-rate RandSeed.

>>> rand_seed = ugentools.RandSeed.ir(
...     seed=1,
...     )
>>> rand_seed
RandSeed.ir()

Returns ugen graph.

classmethod RandSeed.kr(seed=56789, trigger=0)[source]

Constructs a control-rate RandSeed.

>>> trigger = ugentools.Impulse.kr()
>>> rand_seed = ugentools.RandSeed.kr(
...     seed=1,
...     trigger=trigger,
...     )
>>> rand_seed
RandSeed.kr()

Returns ugen graph.

Special methods

(UGenMethodMixin).__abs__()

Gets absolute value of ugen graph.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = abs(ugen_graph)
>>> result
UnaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=(440, 442, 443),
...     )
>>> result = abs(ugen_graph)
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__add__(expr)

Adds expr to ugen graph.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph + expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph + expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph + expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__div__(expr)

Divides ugen graph by expr.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph / expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(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.

(UGenMethodMixin).__ge__(expr)

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

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph >= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph >= expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph >= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGen).__getitem__(i)

Gets output proxy at index i.

>>> ugen = ugentools.SinOsc.ar()
>>> ugen[0]
OutputProxy(
    source=SinOsc(
        calculation_rate=CalculationRate.AUDIO,
        frequency=440.0,
        phase=0.0
        ),
    output_index=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 = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph > expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph > expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph > expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(SupriyaObject).__hash__()

Hashes Supriya object.

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

Returns integer.

(UGenMethodMixin).__le__(expr)

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

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph <= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph <= expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph <= expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

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 = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph < expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph < expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph < expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__mod__(expr)

Gets modulo of ugen graph and expr.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph % expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph % expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph % expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__mul__(expr)

Multiplies ugen graph by expr.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph * expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph * expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph * expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__neg__()

Negates ugen graph.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.ar()
>>> result = -ugen_graph
>>> result
UnaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=(440, 442, 443),
...     )
>>> result = -ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__pow__(expr)

Raises ugen graph to the power of expr.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph ** expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph ** expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph ** expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__radd__(expr)

Adds ugen graph to expr.

Example 1:

>>> expr = 1.5
>>> ugen_graph = ugentools.SinOsc.ar()
>>> result = expr + ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr + ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__rdiv__(expr)

Divides expr by ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = ugentools.SinOsc.ar()
>>> result = expr / ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr / ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGen).__repr__()

Gets interpreter representation of ugen.

>>> ugen = ugentools.SinOsc.ar()
>>> repr(ugen)
'SinOsc.ar()'
>>> ugen = ugentools.WhiteNoise.kr()
>>> repr(ugen)
'WhiteNoise.kr()'
>>> ugen = ugentools.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 = ugentools.SinOsc.ar()
>>> result = expr % ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr % ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__rmul__(expr)

Multiplies expr by ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = ugentools.SinOsc.ar()
>>> result = expr * ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr * ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__rpow__(expr)

Raises expr to the power of ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = ugentools.SinOsc.ar()
>>> result = expr ** ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr ** ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__rsub__(expr)

Subtracts ugen graph from expr.

Example 1:

>>> expr = 1.5
>>> ugen_graph = ugentools.SinOsc.ar()
>>> result = expr - ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr - ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__rtruediv__(expr)

Divides expr by ugen graph.

Example 1:

>>> expr = 1.5
>>> ugen_graph = ugentools.SinOsc.ar()
>>> result = expr / ugen_graph
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> expr = [220, 330]
>>> ugen_graph = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = expr / ugen_graph
>>> result
UGenArray({3})
>>> graph(result)  

Returns ugen graph.

(UGen).__str__()

Gets string format of ugen.

>>> sin_osc_a = ugentools.SinOsc.ar()
>>> sin_osc_b = ugentools.SinOsc.ar(frequency=443)
>>> multiplied = sin_osc_a * sin_osc_b
>>> output = ugentools.Out.ar(source=multiplied)
>>> print(str(output))
SynthDef 221d0a5d0c162c5b9d3d1fd74ffb83ff {
    const_0:440.0 -> 0_SinOsc[0:frequency]
    const_1:0.0 -> 0_SinOsc[1:phase]
    const_2:443.0 -> 1_SinOsc[0:frequency]
    const_1:0.0 -> 1_SinOsc[1:phase]
    0_SinOsc[0] -> 2_BinaryOpUGen:MULTIPLICATION[0:left]
    1_SinOsc[0] -> 2_BinaryOpUGen:MULTIPLICATION[1:right]
    const_1:0.0 -> 3_Out[0:bus]
    2_BinaryOpUGen:MULTIPLICATION[0] -> 3_Out[1:source]
}
(UGenMethodMixin).__sub__(expr)

Subtracts expr from ugen graph.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph - expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph - expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph - expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.

(UGenMethodMixin).__truediv__(expr)

Divides ugen graph by expr.

Example 1:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar()
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Example 2:

>>> ugen_graph = ugentools.WhiteNoise.kr()
>>> expr = ugentools.SinOsc.ar(
...     frequency=[440, 442, 443],
...     )
>>> result = ugen_graph / expr
>>> result
UGenArray({3})
>>> graph(result)  

Example 3:

>>> ugen_graph = ugentools.Dust.ar(
...     density=11.5,
...     )
>>> expr = 4
>>> result = ugen_graph / expr
>>> result
BinaryOpUGen.ar()
>>> graph(result)  

Returns ugen graph.