controls

class AudioControl(parameters, calculation_rate=None, starting_control_index=0)

Bases: supriya.synthdefs.controls.Control

A trigger-rate control ugen.

class Control(parameters, calculation_rate=None, starting_control_index=0)

Bases: supriya.synthdefs.bases.MultiOutUGen

A control-rate control ugen.

Control ugens can be set and routed externally to interact with a running synth. Controls are created from the parameters of a synthesizer definition, and typically do not need to be created by hand.

__getitem__(i)

Gets output proxy at i, via index or control name.

Returns output proxy.

__len__()

Gets number of ugen outputs.

Equal to the number of control names.

Returns integer.

property controls

Gets controls of control ugen.

Returns ugen graph.

classmethod new()

Constructs a Control unit generator graph.

Returns unit generator graph.

property parameters

Gets control names associated with control.

Returns tuple.

property starting_control_index

Gets starting control index of control ugen.

Equivalent to the control ugen’s special index.

Returns integer.

class LagControl(parameters, calculation_rate=None, starting_control_index=0)

Bases: supriya.synthdefs.controls.Control

A lagged control-rate control ugen.

property lags

Gets lags of LagControl.

Returns input.

classmethod new(lags=None)

Constructs a LagControl unit generator graph.

Returns unit generator graph.

class Parameter(lag=None, name=None, parameter_rate=ParameterRate.CONTROL, range_=None, unit=None, value=None)

Bases: supriya.synthdefs.mixins.UGenMethodMixin, supriya.system.SupriyaValueObject

__getitem__(i)
__len__()
property calculation_rate
property has_done_flag
property inputs
property lag

Lags ugen graph.

>>> ugen_graph = supriya.ugens.WhiteNoise.ar()
>>> result = ugen_graph.lag(0.5)
>>> supriya.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)
>>> supriya.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]
property name
property parameter_rate
property range_
property signal_range
property unit
property value
class Range(minimum=None, maximum=None)

Bases: supriya.system.SupriyaValueObject

A range.

>>> supriya.synthdefs.Range(-1.0, 1.0)
Range(
    maximum=1.0,
    minimum=-1.0,
)
>>> supriya.synthdefs.Range(minimum=0.0)
Range(
    maximum=inf,
    minimum=0.0,
)
>>> supriya.synthdefs.Range()
Range(
    maximum=inf,
    minimum=-inf,
)
>>> supriya.synthdefs.Range((0.1, 0.9))
Range(
    maximum=0.9,
    minimum=0.1,
)
>>> supriya.synthdefs.Range(supriya.synthdefs.Range(-3, 3))
Range(
    maximum=3.0,
    minimum=-3.0,
)
property maximum
property minimum
static scale(value, input_range, output_range, exponent=1.0)

Scales value from input_range to output_range.

Curve value exponentially by exponent.

>>> input_range = supriya.synthdefs.Range(0.0, 10.0)
>>> output_range = supriya.synthdefs.Range(-2.5, 2.5)
>>> supriya.synthdefs.Range.scale(0.0, input_range, output_range)
-2.5
>>> supriya.synthdefs.Range.scale(5.0, input_range, output_range)
0.0
>>> supriya.synthdefs.Range.scale(5.0, input_range, output_range, 2.0)
-1.25
>>> supriya.synthdefs.Range.scale(5.0, input_range, output_range, 0.5)
1.0355339059327378

Returns float.

property width
class TrigControl(parameters, calculation_rate=None, starting_control_index=0)

Bases: supriya.synthdefs.controls.Control

A trigger-rate control ugen.