demand

class DUGen(**kwargs)

Bases: UGen

Abstract base class of demand-rate UGens.

class Dbrown(calculation_rate=None, minimum=0.0, maximum=1.0, step=0.01, length=inf)

Bases: DUGen

A demand-rate brownian movement generator.

>>> dbrown = supriya.ugens.Dbrown.new(
...     length=float("inf"),
...     maximum=1,
...     minimum=0,
...     step=0.01,
... )
>>> dbrown
Dbrown()
property length

Gets length of Dbrown.

Returns input.

property maximum

Gets maximum of Dbrown.

Returns input.

property minimum

Gets minimum of Dbrown.

Returns input.

classmethod new(minimum=0.0, maximum=1.0, step=0.01, length=inf)

Constructs a demand-rate Dbrown unit generator graph.

Returns unit generator graph.

property step

Gets step of Dbrown.

Returns input.

class Dbufrd(calculation_rate=None, buffer_id=0, phase=0, loop=1)

Bases: DUGen

A buffer-reading demand-rate UGen.

>>> dbufrd = supriya.ugens.Dbufrd(
...     buffer_id=0,
...     loop=1,
...     phase=0,
... )
>>> dbufrd
Dbufrd()
property buffer_id

Gets buffer_id of Dbufrd.

Returns input.

property loop

Gets loop of Dbufrd.

Returns input.

classmethod new(buffer_id=0, phase=0, loop=1)

Constructs a demand-rate Dbufrd unit generator graph.

Returns unit generator graph.

property phase

Gets phase of Dbufrd.

Returns input.

class Dbufwr(calculation_rate=None, source=0.0, buffer_id=0.0, phase=0.0, loop=1.0)

Bases: DUGen

A buffer-writing demand-rate UGen.

>>> dbufwr = supriya.ugens.Dbufwr(
...     buffer_id=0,
...     source=0,
...     loop=1,
...     phase=0,
... )
>>> dbufwr
Dbufwr()
property buffer_id

Gets buffer_id of Dbufwr.

Returns input.

property loop

Gets loop of Dbufwr.

Returns input.

classmethod new(source=0.0, buffer_id=0.0, phase=0.0, loop=1.0)

Constructs a demand-rate Dbufwr unit generator graph.

Returns unit generator graph.

property phase

Gets phase of Dbufwr.

Returns input.

property source

Gets source of Dbufwr.

Returns input.

class Demand(calculation_rate=None, trigger=None, reset=None, source=None)

Bases: MultiOutUGen

Demands results from demand-rate UGens.

>>> source = [
...     supriya.ugens.Dseries(),
...     supriya.ugens.Dwhite(),
... ]
>>> trigger = supriya.ugens.Impulse.kr(1)
>>> demand = supriya.ugens.Demand.ar(
...     reset=0,
...     source=source,
...     trigger=trigger,
... )
>>> demand
UGenArray({2})
classmethod ar(trigger=0, reset=0, source=None)

Constructs a audio-rate Demand unit generator graph.

Returns unit generator graph.

classmethod kr(trigger=0, reset=0, source=None)

Constructs a control-rate Demand unit generator graph.

Returns unit generator graph.

property reset

Gets reset of Demand.

Returns input.

property source

Gets source of Demand.

Returns input.

property trigger

Gets trigger of Demand.

Returns input.

class DemandEnvGen(calculation_rate=None, level=None, duration=None, shape=1, curve=0, gate=1, reset=1, level_scale=1, level_bias=0, time_scale=1, done_action=0)

Bases: UGen

A demand rate envelope generator.

>>> demand_env_gen = supriya.ugens.DemandEnvGen.ar(
...     curve=0,
...     done_action=0,
...     duration=1,
...     gate=1,
...     level=1,
...     level_bias=0,
...     level_scale=1,
...     reset=1,
...     shape=1,
...     time_scale=1,
... )
>>> demand_env_gen
DemandEnvGen.ar()
classmethod ar(level=None, duration=None, shape=1, curve=0, gate=1, reset=1, level_scale=1, level_bias=0, time_scale=1, done_action=0)

Constructs a audio-rate DemandEnvGen unit generator graph.

Returns unit generator graph.

property curve

Gets curve of DemandEnvGen.

Returns input.

property done_action

Gets done_action of DemandEnvGen.

Returns input.

property duration

Gets duration of DemandEnvGen.

Returns input.

property gate

Gets gate of DemandEnvGen.

Returns input.

classmethod kr(level=None, duration=None, shape=1, curve=0, gate=1, reset=1, level_scale=1, level_bias=0, time_scale=1, done_action=0)

Constructs a control-rate DemandEnvGen unit generator graph.

Returns unit generator graph.

property level

Gets level of DemandEnvGen.

Returns input.

property level_bias

Gets level_bias of DemandEnvGen.

Returns input.

property level_scale

Gets level_scale of DemandEnvGen.

Returns input.

property reset

Gets reset of DemandEnvGen.

Returns input.

property shape

Gets shape of DemandEnvGen.

Returns input.

property time_scale

Gets time_scale of DemandEnvGen.

Returns input.

class Dgeom(calculation_rate=None, start=1, grow=2, length=inf)

Bases: DUGen

A demand-rate geometric series generator.

>>> dgeom = supriya.ugens.Dgeom.new(
...     grow=2,
...     length=float("inf"),
...     start=1,
... )
>>> dgeom
Dgeom()
property grow

Gets grow of Dgeom.

Returns input.

property length

Gets length of Dgeom.

Returns input.

classmethod new(start=1, grow=2, length=inf)

Constructs a demand-rate Dgeom unit generator graph.

Returns unit generator graph.

property start

Gets start of Dgeom.

Returns input.

class Dibrown(calculation_rate=None, minimum=0, maximum=12, step=1, length=inf)

Bases: DUGen

An integer demand-rate brownian movement generator.

>>> dibrown = supriya.ugens.Dibrown.new(
...     length=float("inf"),
...     maximum=1,
...     minimum=0,
...     step=0.01,
... )
>>> dibrown
Dibrown()
property length

Gets length of Dibrown.

Returns input.

property maximum

Gets maximum of Dibrown.

Returns input.

property minimum

Gets minimum of Dibrown.

Returns input.

classmethod new(minimum=0, maximum=12, step=1, length=inf)

Constructs a demand-rate Dibrown unit generator graph.

Returns unit generator graph.

property step

Gets step of Dibrown.

Returns input.

class Diwhite(calculation_rate=None, minimum=0, maximum=1, length=inf)

Bases: DUGen

An integer demand-rate white noise random generator.

>>> diwhite = supriya.ugens.Diwhite.new(
...     length=float("inf"),
...     maximum=1,
...     minimum=0,
... )
>>> diwhite
Diwhite()
property length

Gets length of Diwhite.

Returns input.

property maximum

Gets maximum of Diwhite.

Returns input.

property minimum

Gets minimum of Diwhite.

Returns input.

classmethod new(minimum=0, maximum=1, length=inf)

Constructs a demand-rate Diwhite unit generator graph.

Returns unit generator graph.

class Drand(calculation_rate=None, repeats=1, sequence=None)

Bases: DUGen

A demand-rate random sequence generator.

>>> sequence = (1, 2, 3)
>>> drand = supriya.ugens.Drand.new(
...     repeats=1,
...     sequence=sequence,
... )
>>> drand
Drand()
classmethod new(repeats=1, sequence=None)

Constructs a demand-rate Drand unit generator graph.

Returns unit generator graph.

property repeats

Gets repeats of Drand.

Returns input.

property sequence

Gets sequence of Drand.

Returns input.

class Dreset(calculation_rate=None, source=None, reset=0)

Bases: DUGen

Resets demand-rate UGens.

>>> source = supriya.ugens.Dseries(start=0, step=2)
>>> dreset = supriya.ugens.Dreset(
...     reset=0,
...     source=source,
... )
>>> dreset
Dreset()
classmethod new(source=None, reset=0)

Constructs a demand-rate Dreset unit generator graph.

Returns unit generator graph.

property reset

Gets reset of Dreset.

Returns input.

property source

Gets source of Dreset.

Returns input.

class Dseq(calculation_rate=None, repeats=1, sequence=None)

Bases: DUGen

A demand-rate sequence generator.

>>> sequence = (1, 2, 3)
>>> dseq = supriya.ugens.Dseq.new(
...     repeats=1,
...     sequence=sequence,
... )
>>> dseq
Dseq()
classmethod new(repeats=1, sequence=None)

Constructs a demand-rate Dseq unit generator graph.

Returns unit generator graph.

property repeats

Gets repeats of Dseq.

Returns input.

property sequence

Gets sequence of Dseq.

Returns input.

class Dser(calculation_rate=None, repeats=1, sequence=None)

Bases: DUGen

A demand-rate sequence generator.

>>> sequence = (1, 2, 3)
>>> dser = supriya.ugens.Dser.new(
...     repeats=1,
...     sequence=sequence,
... )
>>> dser
Dser()
classmethod new(repeats=1, sequence=None)

Constructs a demand-rate Dser unit generator graph.

Returns unit generator graph.

property repeats

Gets repeats of Dser.

Returns input.

property sequence

Gets sequence of Dser.

Returns input.

class Dseries(calculation_rate=None, length=inf, start=1, step=1)

Bases: DUGen

A demand-rate arithmetic series.

>>> dseries = supriya.ugens.Dseries.new(
...     length=float("inf"),
...     start=1,
...     step=1,
... )
>>> dseries
Dseries()
property length

Gets length of Dseries.

Returns input.

classmethod new(start=1, step=1, length=inf)

Constructs a demand-rate Dseries unit generator graph.

Returns unit generator graph.

property start

Gets start of Dseries.

Returns input.

property step

Gets step of Dseries.

Returns input.

class Dshuf(calculation_rate=None, repeats=1, sequence=None)

Bases: DUGen

A demand-rate random sequence generator.

>>> sequence = (1, 2, 3)
>>> dshuf = supriya.ugens.Dshuf.new(
...     repeats=1,
...     sequence=sequence,
... )
>>> dshuf
Dshuf()
classmethod new(repeats=1, sequence=None)

Constructs a demand-rate Dshuf unit generator graph.

Returns unit generator graph.

property repeats

Gets repeats of Dshuf.

Returns input.

property sequence

Gets sequence of Dshuf.

Returns input.

class Dstutter(calculation_rate=None, n=2.0, source=None)

Bases: DUGen

A demand-rate input replicator.

>>> source = supriya.ugens.In.ar(bus=0)
>>> dstutter = supriya.ugens.Dstutter.new(
...     n=2,
...     source=source,
... )
>>> dstutter
Dstutter()
property n

Gets n of Dstutter.

Returns input.

classmethod new(n=2.0, source=None)

Constructs a demand-rate Dstutter unit generator graph.

Returns unit generator graph.

property source

Gets source of Dstutter.

Returns input.

class Dswitch(calculation_rate=None, index=None, sequence=None)

Bases: DUGen

A demand-rate generator for embedding different inputs.

>>> index = supriya.ugens.Dseq(sequence=[0, 1, 2, 1, 0])
>>> sequence = (1.0, 2.0, 3.0)
>>> dswitch = supriya.ugens.Dswitch.new(
...     index=index,
...     sequence=sequence,
... )
>>> dswitch
Dswitch()
property index

Gets index of Dswitch.

Returns input.

classmethod new(index=None, sequence=None)

Constructs a demand-rate Dswitch unit generator graph.

Returns unit generator graph.

property sequence

Gets sequence of Dswitch.

Returns input.

class Dswitch1(calculation_rate=None, index=None, sequence=None)

Bases: DUGen

A demand-rate generator for switching between inputs.

>>> index = supriya.ugens.Dseq(sequence=[0, 1, 2, 1, 0])
>>> sequence = (1.0, 2.0, 3.0)
>>> dswitch_1 = supriya.ugens.Dswitch1.new(
...     index=index,
...     sequence=sequence,
... )
>>> dswitch_1
Dswitch1()
property index

Gets index of Dswitch1.

Returns input.

classmethod new(index=None, sequence=None)

Constructs a demand-rate Dswitch1 unit generator graph.

Returns unit generator graph.

property sequence

Gets sequence of Dswitch1.

Returns input.

class Dunique(calculation_rate=None, source=None, max_buffer_size=1024, protected=True)

Bases: DUGen

Returns the same unique series of values for several demand streams.

>>> source = supriya.ugens.In.ar(bus=0)
>>> dunique = supriya.ugens.Dunique.new(
...     max_buffer_size=1024,
...     protected=True,
...     source=source,
... )
>>> dunique
Dunique()
property max_buffer_size

Gets max_buffer_size of Dunique.

Returns input.

classmethod new(source=None, max_buffer_size=1024, protected=True)

Constructs a demand-rate Dunique unit generator graph.

Returns unit generator graph.

property protected

Gets protected of Dunique.

Returns input.

property source

Gets source of Dunique.

Returns input.

class Duty(calculation_rate=None, duration=1.0, reset=0.0, level=1.0, done_action=0.0)

Bases: UGen

A value is demanded of each UGen in the list and output according to a stream of duration values.

>>> duty = supriya.ugens.Duty.kr(
...     done_action=0,
...     duration=supriya.ugens.Drand(
...         sequence=[0.01, 0.2, 0.4],
...         repeats=2,
...     ),
...     reset=0,
...     level=supriya.ugens.Dseq(
...         sequence=[204, 400, 201, 502, 300, 200],
...         repeats=2,
...     ),
... )
>>> duty
Duty.kr()
classmethod ar(duration=1.0, reset=0.0, level=1.0, done_action=0.0)

Constructs a audio-rate Duty unit generator graph.

Returns unit generator graph.

property done_action

Gets done_action of Duty.

Returns input.

property duration

Gets duration of Duty.

Returns input.

classmethod kr(duration=1.0, reset=0.0, level=1.0, done_action=0.0)

Constructs a control-rate Duty unit generator graph.

Returns unit generator graph.

property level

Gets level of Duty.

Returns input.

property reset

Gets reset of Duty.

Returns input.

class Dwhite(calculation_rate=None, minimum=0.0, maximum=1.0, length=inf)

Bases: DUGen

A demand-rate white noise random generator.

>>> dwhite = supriya.ugens.Dwhite.new(
...     length=float("inf"),
...     maximum=1,
...     minimum=0,
... )
>>> dwhite
Dwhite()
property length

Gets length of Dwhite.

Returns input.

property maximum

Gets maximum of Dwhite.

Returns input.

property minimum

Gets minimum of Dwhite.

Returns input.

classmethod new(minimum=0.0, maximum=1.0, length=inf)

Constructs a demand-rate Dwhite unit generator graph.

Returns unit generator graph.

class Dwrand(repeats=1, sequence=None, weights=None, **kwargs)

Bases: DUGen

A demand-rate weighted random sequence generator.

>>> sequence = [0, 1, 2, 7]
>>> weights = [0.4, 0.4, 0.1, 0.1]
>>> dwrand = supriya.ugens.Dwrand.new(
...     repeats=1,
...     sequence=sequence,
...     weights=weights,
... )
>>> dwrand
Dwrand()
property length

Gets length of Dwrand.

Returns input.

classmethod new(repeats=1, length=None, weights=None, sequence=None)

Constructs a demand-rate Dwrand unit generator graph.

Returns unit generator graph.

property repeats

Gets repeats of Dwrand.

Returns input.

property sequence

Gets sequence of Dwrand.

Returns input.

property weights

Gets weights of Dwrand.

Returns input.

class Dxrand(calculation_rate=None, repeats=1, sequence=None)

Bases: DUGen

A demand-rate random sequence generator.

>>> sequence = (1, 2, 3)
>>> dxrand = supriya.ugens.Dxrand.new(
...     repeats=1,
...     sequence=sequence,
... )
>>> dxrand
Dxrand()
classmethod new(repeats=1, sequence=None)

Constructs a demand-rate Dxrand unit generator graph.

Returns unit generator graph.

property repeats

Gets repeats of Dxrand.

Returns input.

property sequence

Gets sequence of Dxrand.

Returns input.