Random generators

Set of objects that implement different kinds of random noise generators.

Objects in this category

  • Choice : Periodically choose a new value from a user list.

  • LogiMap : Random generator based on the logistic map.

  • RandDur : Recursive time varying pseudo-random generator.

  • RandInt : Periodic pseudo-random integer generator.

  • Randh : Periodic pseudo-random generator.

  • Randi : Periodic pseudo-random generator with interpolation.

  • Urn : Periodic pseudo-random integer generator without duplicates.

  • Xnoise : X-class pseudo-random generator.

  • XnoiseDur : Recursive time varying X-class pseudo-random generator.

  • XnoiseMidi : X-class midi notes pseudo-random generator.

Choice

class Choice(choice, freq=1.0, mul=1, add=0)[source]

Periodically choose a new value from a user list.

Choice chooses a new value from a predefined list of floats choice at a frequency specified by freq parameter. Choice will hold choosen value until next generation.

Parent

PyoObject

Args
choice: list of floats or list of lists of floats

Possible values for the random generation.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

>>> s = Server().boot()
>>> s.start()
>>> freqs = midiToHz([60,62,64,65,67,69,71,72])
>>> rnd = Choice(choice=freqs, freq=[3,4])
>>> a = SineLoop(rnd, feedback=0.05, mul=.2).out()

Public Data Attributes:

choice

list of floats or list of lists of floats.

freq

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(choice[, freq, mul, add])

setChoice(x)

Replace the choice attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setChoice(x)[source]

Replace the choice attribute.

Args
x: list of floats or list of lists of floats

new choice attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property choice

list of floats or list of lists of floats. Possible choices.

property freq

float or PyoObject. Polling frequency.

LogiMap

class LogiMap(chaos=0.6, freq=1.0, init=0.5, mul=1, add=0)[source]

Random generator based on the logistic map.

The logistic equation (sometimes called the Verhulst model or logistic growth curve) is a model of population growth first published by Pierre Verhulst (1845, 1847). The logistic map is a discrete quadratic recurrence equation derived from the logistic equation that can be effectively used as a number generator that exhibit chaotic behavior. This object uses the following equation:

x[n] = (r + 3) * x[n-1] * (1.0 - x[n-1])

where ‘r’ is the randomization factor between 0 and 1.

Parent

PyoObject

Args
chaos: float or PyoObject, optional

Randomization factor, 0.0 < chaos < 1.0. Defaults to 0.6.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

init: float, optional

Initial value, 0.0 < init < 1.0. Defaults to 0.5.

Note

The method play() resets the internal state to the initial value.

>>> s = Server().boot()
>>> s.start()
>>> val = LogiMap([0.6,0.65], [4,8])
>>> mid = Round(Scale(val, 0, 1, [36,48], [72,84]))
>>> hz = Snap(mid, [0,2,4,5,7,9,11], 1)
>>> env = CosTable([(0,0), (32,1), (4064,1), (4096,0), (8192,0)])
>>> amp = TrigEnv(Change(val), table=env, dur=[.25,.125], mul=0.3)
>>> osc = RCOsc(hz, mul=amp).out()

Public Data Attributes:

chaos

float or PyoObject.

freq

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([chaos, freq, init, mul, add])

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

setChaos(x)

Replace the chaos attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


out(chnl=0, inc=1, dur=0, delay=0)[source]

Start processing and send samples to audio output beginning at chnl.

This method returns self, allowing it to be applied at the object creation.

Args
chnl: int, optional

Physical output assigned to the first audio stream of the object. Defaults to 0.

inc: int, optional

Output channel increment value. Defaults to 1.

dur: float, optional

Duration, in seconds, of the object’s activation. The default is 0 and means infinite duration.

delay: float, optional

Delay, in seconds, before the object’s activation. Defaults to 0.

If chnl >= 0, successive streams increment the output number by inc and wrap around the global number of channels.

If chnl is negative, streams begin at 0, increment the output number by inc and wrap around the global number of channels. Then, the list of streams is scrambled.

If chnl is a list, successive values in the list will be assigned to successive streams.

setChaos(x)[source]

Replace the chaos attribute.

Args
x: float or PyoObject

new chaos attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property chaos

float or PyoObject. Randomization factor.

property freq

float or PyoObject. Polling frequency.

RandDur

class RandDur(min=0.0, max=1.0, mul=1, add=0)[source]

Recursive time varying pseudo-random generator.

RandDur generates a pseudo-random number between min and max arguments and uses that number to set the delay time before the next generation. RandDur will hold the generated value until next generation.

Parent

PyoObject

Args
min: float or PyoObject, optional

Minimum value for the random generation. Defaults to 0.

max: float or PyoObject, optional

Maximum value for the random generation. Defaults to 1.

>>> s = Server().boot()
>>> s.start()
>>> dur = RandDur(min=[.05,0.1], max=[.4,.5])
>>> trig = Change(dur)
>>> amp = TrigEnv(trig, table=HannTable(), dur=dur, mul=.2)
>>> freqs = midiToHz([60,63,67,70,72])
>>> freq = TrigChoice(trig, choice=freqs)
>>> a = LFO(freq=freq, type=2, mul=amp).out()

Public Data Attributes:

min

float or PyoObject.

max

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([min, max, mul, add])

setMin(x)

Replace the min attribute.

setMax(x)

Replace the max attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setMin(x)[source]

Replace the min attribute.

Args
x: float or PyoObject

new min attribute.

setMax(x)[source]

Replace the max attribute.

Args
x: float or PyoObject

new max attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property min

float or PyoObject. Minimum value.

property max

float or PyoObject. Maximum value.

RandInt

class RandInt(max=100, freq=1.0, mul=1, add=0)[source]

Periodic pseudo-random integer generator.

RandInt generates a pseudo-random integer number between 0 and max values at a frequency specified by freq parameter. RandInt will hold generated value until the next generation.

Parent

PyoObject

Args
max: float or PyoObject, optional

Maximum value for the random generation. Defaults to 100.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

>>> s = Server().boot()
>>> s.start()
>>> freq = RandInt(max=10, freq=5, mul=100, add=500)
>>> jit = Randi(min=0.99, max=1.01, freq=[2.33,3.41])
>>> a = SineLoop(freq*jit, feedback=0.03, mul=.2).out()

Public Data Attributes:

max

float or PyoObject.

freq

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([max, freq, mul, add])

setMax(x)

Replace the max attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setMax(x)[source]

Replace the max attribute.

Args
x: float or PyoObject

new max attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property max

float or PyoObject. Maximum value.

property freq

float or PyoObject. Polling frequency.

Randh

class Randh(min=0.0, max=1.0, freq=1.0, mul=1, add=0)[source]

Periodic pseudo-random generator.

Randh generates a pseudo-random number between min and max values at a frequency specified by freq parameter. Randh will hold generated value until next generation.

Parent

PyoObject

Args
min: float or PyoObject, optional

Minimum value for the random generation. Defaults to 0.

max: float or PyoObject, optional

Maximum value for the random generation. Defaults to 1.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

>>> s = Server().boot()
>>> s.start()
>>> freq = Randh(500, 3000, 4)
>>> noze = Noise().mix(2)
>>> a = Biquad(noze, freq=freq, q=5, type=2, mul=.5).out()

Public Data Attributes:

min

float or PyoObject.

max

float or PyoObject.

freq

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([min, max, freq, mul, add])

setMin(x)

Replace the min attribute.

setMax(x)

Replace the max attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setMin(x)[source]

Replace the min attribute.

Args
x: float or PyoObject

new min attribute.

setMax(x)[source]

Replace the max attribute.

Args
x: float or PyoObject

new max attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property min

float or PyoObject. Minimum value.

property max

float or PyoObject. Maximum value.

property freq

float or PyoObject. Polling frequency.

Randi

class Randi(min=0.0, max=1.0, freq=1.0, mul=1, add=0)[source]

Periodic pseudo-random generator with interpolation.

Randi generates a pseudo-random number between min and max values at a frequency specified by freq parameter. Randi will produce straight-line interpolation between current number and the next.

Parent

PyoObject

Args
min: float or PyoObject, optional

Minimum value for the random generation. Defaults to 0.

max: float or PyoObject, optional

Maximum value for the random generation. Defaults to 1.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

>>> s = Server().boot()
>>> s.start()
>>> freq = Randi(500, 3000, 4)
>>> noze = Noise().mix(2)
>>> a = Biquad(noze, freq=freq, q=5, type=2, mul=.5).out()

Public Data Attributes:

min

float or PyoObject.

max

float or PyoObject.

freq

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([min, max, freq, mul, add])

setMin(x)

Replace the min attribute.

setMax(x)

Replace the max attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setMin(x)[source]

Replace the min attribute.

Args
x: float or PyoObject

new min attribute.

setMax(x)[source]

Replace the max attribute.

Args
x: float or PyoObject

new max attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property min

float or PyoObject. Minimum value.

property max

float or PyoObject. Maximum value.

property freq

float or PyoObject. Polling frequency.

Urn

class Urn(max=100, freq=1.0, mul=1, add=0)[source]

Periodic pseudo-random integer generator without duplicates.

Urn generates a pseudo-random integer number between 0 and max values at a frequency specified by freq parameter. Urn will hold generated value until the next generation. Urn works like RandInt, except that it keeps track of each number which has been generated. After all numbers have been outputed, the pool is reseted and the object send a trigger signal.

Parent

PyoObject

Args
max: int, optional

Maximum value for the random generation. Defaults to 100.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

Note

Urn will send a trigger signal when the pool is empty. User can retreive the trigger streams by calling obj[‘trig’]. Useful to synchronize other processes.

>>> s = Server().boot()
>>> s.start()
>>> mid = Urn(max=12, freq=10, add=60)
>>> fr = MToF(mid)
>>> sigL = SineLoop(freq=fr, feedback=.08, mul=0.3).out()
>>> amp = TrigExpseg(mid["trig"], [(0,0),(.01,.25),(1,0)])
>>> sigR = SineLoop(midiToHz(84), feedback=0.05, mul=amp).out(1)

Public Data Attributes:

max

int.

freq

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([max, freq, mul, add])

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

setMax(x)

Replace the max attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


out(chnl=0, inc=1, dur=0, delay=0)[source]

Start processing and send samples to audio output beginning at chnl.

This method returns self, allowing it to be applied at the object creation.

Args
chnl: int, optional

Physical output assigned to the first audio stream of the object. Defaults to 0.

inc: int, optional

Output channel increment value. Defaults to 1.

dur: float, optional

Duration, in seconds, of the object’s activation. The default is 0 and means infinite duration.

delay: float, optional

Delay, in seconds, before the object’s activation. Defaults to 0.

If chnl >= 0, successive streams increment the output number by inc and wrap around the global number of channels.

If chnl is negative, streams begin at 0, increment the output number by inc and wrap around the global number of channels. Then, the list of streams is scrambled.

If chnl is a list, successive values in the list will be assigned to successive streams.

setMax(x)[source]

Replace the max attribute.

Args
x: int

new max attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property max

int. Maximum value.

property freq

float or PyoObject. Polling frequency.

Xnoise

class Xnoise(dist=0, freq=1.0, x1=0.5, x2=0.5, mul=1, add=0)[source]

X-class pseudo-random generator.

Xnoise implements a few of the most common noise distributions. Each distribution generates values in the range 0 and 1.

Parent

PyoObject

Args
dist: string or int, optional

Distribution type. Defaults to 0.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

x1: float or PyoObject, optional

First parameter. Defaults to 0.5.

x2: float or PyoObject, optional

Second parameter. Defaults to 0.5.

Note

Available distributions are:
  1. uniform

  2. linear minimum

  3. linear maximum

  4. triangular

  5. exponential minimum

  6. exponential maximum

  7. double (bi)exponential

  8. cauchy

  9. weibull

  10. gaussian

  11. poisson

  12. walker (drunk)

  13. loopseg (drunk with looped segments)

Depending on the distribution, x1 and x2 parameters are applied as follow (names as string, or associated number can be used as dist parameter):

  1. uniform
    • x1: not used

    • x2: not used

  2. linear_min
    • x1: not used

    • x2: not used

  3. linear_max
    • x1: not used

    • x2: not used

  4. triangle
    • x1: not used

    • x2: not used

  5. expon_min
    • x1: slope {0 = no slope -> 10 = sharp slope}

    • x2: not used

  6. expon_max
    • x1: slope {0 = no slope -> 10 = sharp slope}

    • x2: not used

  7. biexpon
    • x1: bandwidth {0 = huge bandwidth -> 10 = narrow bandwidth}

    • x2: not used

  8. cauchy
    • x1: bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth}

    • x2: not used

  9. weibull
    • x1: mean location {0 -> 1}

    • x2: shape {0.5 = linear min, 1.5 = expon min, 3.5 = gaussian}

  10. gaussian
    • x1: mean location {0 -> 1}

    • x2: bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth}

  11. poisson
    • x1: gravity center {0 = low values -> 10 = high values}

    • x2: compress/expand range {0.1 = full compress -> 4 full expand}

  12. walker
    • x1: maximum value {0.1 -> 1}

    • x2: maximum step {0.1 -> 1}

  13. loopseg
    • x1: maximum value {0.1 -> 1}

    • x2: maximum step {0.1 -> 1}

>>> s = Server().boot()
>>> s.start()
>>> lfo = Phasor(.1, 0, .5, .15)
>>> freq = Xnoise(dist=12, freq=8, x1=1, x2=lfo, mul=1000, add=500)
>>> jit = Randi(min=0.99, max=1.01, freq=[2.33,3.41])
>>> a = SineLoop(freq*jit, feedback=0.03, mul=.2).out()

Public Data Attributes:

dist

string or int.

freq

float or PyoObject.

x1

float or PyoObject.

x2

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([dist, freq, x1, x2, mul, add])

setDist(x)

Replace the dist attribute.

setX1(x)

Replace the x1 attribute.

setX2(x)

Replace the x2 attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setDist(x)[source]

Replace the dist attribute.

Args
x: string or int

new dist attribute.

setX1(x)[source]

Replace the x1 attribute.

Args
x: float or PyoObject

new x1 attribute.

setX2(x)[source]

Replace the x2 attribute.

Args
x: float or PyoObject

new x2 attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property dist

string or int. Distribution type.

property freq

float or PyoObject. Polling frequency.

property x1

float or PyoObject. First parameter.

property x2

float or PyoObject. Second parameter.

XnoiseDur

class XnoiseDur(dist=0, min=0.0, max=1.0, x1=0.5, x2=0.5, mul=1, add=0)[source]

Recursive time varying X-class pseudo-random generator.

Xnoise implements a few of the most common noise distributions. Each distribution generates values in the range 0 to 1, which are then rescaled between min and max arguments. The object uses the generated value to set the delay time before the next generation. XnoiseDur will hold the value until next generation.

Parent

PyoObject

Args
dist: string or int, optional

Distribution type. Can be the name of the distribution as a string or its associated number. Defaults to 0.

min: float or PyoObject, optional

Minimum value for the random generation. Defaults to 0.

max: float or PyoObject, optional

Maximum value for the random generation. Defaults to 1.

x1: float or PyoObject, optional

First parameter. Defaults to 0.5.

x2: float or PyoObject, optional

Second parameter. Defaults to 0.5.

Note

Available distributions are:
  1. uniform

  2. linear minimum

  3. linear maximum

  4. triangular

  5. exponential minimum

  6. exponential maximum

  7. double (bi)exponential

  8. cauchy

  9. weibull

  10. gaussian

  11. poisson

  12. walker (drunk)

  13. loopseg (drunk with looped segments)

Depending on the distribution, x1 and x2 parameters are applied as follow (names as string, or associated number can be used as dist parameter):

  1. uniform
    • x1: not used

    • x2: not used

  2. linear_min
    • x1: not used

    • x2: not used

  3. linear_max
    • x1: not used

    • x2: not used

  4. triangle
    • x1: not used

    • x2: not used

  5. expon_min
    • x1: slope {0 = no slope -> 10 = sharp slope}

    • x2: not used

  6. expon_max
    • x1: slope {0 = no slope -> 10 = sharp slope}

    • x2: not used

  7. biexpon
    • x1: bandwidth {0 = huge bandwidth -> 10 = narrow bandwidth}

    • x2: not used

  8. cauchy
    • x1: bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth}

    • x2: not used

  9. weibull
    • x1: mean location {0 -> 1}

    • x2: shape {0.5 = linear min, 1.5 = expon min, 3.5 = gaussian}

  10. gaussian
    • x1: mean location {0 -> 1}

    • x2: bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth}

  11. poisson
    • x1: gravity center {0 = low values -> 10 = high values}

    • x2: compress/expand range {0.1 = full compress -> 4 full expand}

  12. walker
    • x1: maximum value {0.1 -> 1}

    • x2: maximum step {0.1 -> 1}

  13. loopseg
    • x1: maximum value {0.1 -> 1}

    • x2: maximum step {0.1 -> 1}

>>> s = Server().boot()
>>> s.start()
>>> dur = XnoiseDur(dist="expon_min", min=[.05,0.1], max=[.4,.5], x1=3)
>>> trig = Change(dur)
>>> amp = TrigEnv(trig, table=HannTable(), dur=dur, mul=.2)
>>> freqs = midiToHz([60,63,67,70,72])
>>> freq = TrigChoice(trig, choice=freqs)
>>> a = LFO(freq=freq, type=2, mul=amp).out()

Public Data Attributes:

dist

string or int.

min

float or PyoObject.

max

float or PyoObject.

x1

float or PyoObject.

x2

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([dist, min, max, x1, x2, mul, add])

setDist(x)

Replace the dist attribute.

setMin(x)

Replace the min attribute.

setMax(x)

Replace the max attribute.

setX1(x)

Replace the x1 attribute.

setX2(x)

Replace the x2 attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setDist(x)[source]

Replace the dist attribute.

Args
x: string or int

new dist attribute.

setMin(x)[source]

Replace the min attribute.

Args
x: float or PyoObject

new min attribute.

setMax(x)[source]

Replace the max attribute.

Args
x: float or PyoObject

new max attribute.

setX1(x)[source]

Replace the x1 attribute.

Args
x: float or PyoObject

new x1 attribute.

setX2(x)[source]

Replace the x2 attribute.

Args
x: float or PyoObject

new x2 attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property dist

string or int. Distribution type.

property min

float or PyoObject. Minimum value.

property max

float or PyoObject. Maximum value.

property x1

float or PyoObject. First parameter.

property x2

float or PyoObject. Second parameter.

XnoiseMidi

class XnoiseMidi(dist=0, freq=1.0, x1=0.5, x2=0.5, scale=0, mrange=(0, 127), mul=1, add=0)[source]

X-class midi notes pseudo-random generator.

XnoiseMidi implements a few of the most common noise distributions. Each distribution generates integer values in the range defined with mrange parameter and output can be scaled on midi notes, hertz or transposition factor.

Parent

PyoObject

Args
dist: string or int, optional

Distribution type. Defaults to 0.

freq: float or PyoObject, optional

Polling frequency. Defaults to 1.

x1: float or PyoObject, optional

First parameter. Defaults to 0.5.

x2: float or PyoObject, optional

Second parameter. Defaults to 0.5.

scale: int {0, 1, 2}, optional

Output format. 0 = Midi, 1 = Hertz, 2 = transposition factor. In the transposition mode, the central key (the key where there is no transposition) is (minrange + maxrange) / 2. Defaults to 0.

mrange: tuple of int, optional

Minimum and maximum possible values, in Midi notes. Available only at initialization time. Defaults to (0, 127).

Note

Available distributions are:
  1. uniform

  2. linear minimum

  3. linear maximum

  4. triangular

  5. exponential minimum

  6. exponential maximum

  7. double (bi)exponential

  8. cauchy

  9. weibull

  10. gaussian

  11. poisson

  12. walker (drunk)

  13. loopseg (drunk with looped segments)

Depending on the distribution, x1 and x2 parameters are applied as follow (names as string, or associated number can be used as dist parameter):

  1. uniform
    • x1: not used

    • x2: not used

  2. linear_min
    • x1: not used

    • x2: not used

  3. linear_max
    • x1: not used

    • x2: not used

  4. triangle
    • x1: not used

    • x2: not used

  5. expon_min
    • x1: slope {0 = no slope -> 10 = sharp slope}

    • x2: not used

  6. expon_max
    • x1: slope {0 = no slope -> 10 = sharp slope}

    • x2: not used

  7. biexpon
    • x1: bandwidth {0 = huge bandwidth -> 10 = narrow bandwidth}

    • x2: not used

  8. cauchy
    • x1: bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth}

    • x2: not used

  9. weibull
    • x1: mean location {0 -> 1}

    • x2: shape {0.5 = linear min, 1.5 = expon min, 3.5 = gaussian}

  10. gaussian
    • x1: mean location {0 -> 1}

    • x2: bandwidth {0 = narrow bandwidth -> 10 = huge bandwidth}

  11. poisson
    • x1: gravity center {0 = low values -> 10 = high values}

    • x2: compress/expand range {0.1 = full compress -> 4 full expand}

  12. walker
    • x1: maximum value {0.1 -> 1}

    • x2: maximum step {0.1 -> 1}

  13. loopseg
    • x1: maximum value {0.1 -> 1}

    • x2: maximum step {0.1 -> 1}

>>> s = Server().boot()
>>> s.start()
>>> l = Phasor(.4)
>>> rnd = XnoiseMidi('loopseg', freq=8, x1=1, x2=l, scale=0, mrange=(60,96))
>>> freq = Snap(rnd, choice=[0, 2, 3, 5, 7, 8, 11], scale=1)
>>> jit = Randi(min=0.99, max=1.01, freq=[2.33,3.41])
>>> a = SineLoop(freq*jit, feedback=0.03, mul=.2).out()

Public Data Attributes:

dist

string or int.

freq

float or PyoObject.

x1

float or PyoObject.

x2

float or PyoObject.

scale

int.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__([dist, freq, x1, x2, scale, ...])

setDist(x)

Replace the dist attribute.

setScale(x)

Replace the scale attribute.

setRange(mini, maxi)

Replace the mrange attribute.

setX1(x)

Replace the x1 attribute.

setX2(x)

Replace the x2 attribute.

setFreq(x)

Replace the freq attribute.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObject

__init__([mul, add])

__add__(x)

__radd__(x)

__iadd__(x)

__sub__(x)

__rsub__(x)

__isub__(x)

__mul__(x)

__rmul__(x)

__imul__(x)

__truediv__(x)

__rtruediv__(x)

__itruediv__(x)

__div__(x)

__rdiv__(x)

__idiv__(x)

__pow__(x)

__rpow__(x)

__mod__(x)

__neg__()

__lt__(x)

Return self<value.

__le__(x)

Return self<=value.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__gt__(x)

Return self>value.

__ge__(x)

Return self>=value.

__do_comp__(comp, mode[, default])

isPlaying([all])

Returns True if the object is currently playing, otherwise, returns False.

isOutputting([all])

Returns True if the object is outputting.

get([all])

Return the first sample of the current buffer as a float.

play([dur, delay])

Start processing without sending samples to output.

out([chnl, inc, dur, delay])

Start processing and send samples to audio output beginning at chnl.

stop([wait])

Stop processing.

mix([voices])

Mix the object's audio streams into voices streams and return a Mix object.

range(min, max)

Adjust mul and add attributes according to a given range.

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setSub(x)

Replace and inverse the add attribute.

setDiv(x)

Replace and inverse the mul attribute.

set(attr, value[, port, callback])

Replace any attribute with portamento.

ctrl([map_list, title, wxnoserver])

Opens a sliders window to control the parameters of the object.

Inherited from PyoObjectBase

__init__()

dump()

Print infos about the current state of the object.

getBaseObjects()

Return a list of Stream objects managed by the instance.

getServer()

Return a reference to the current Server object.

getSamplingRate()

Return the current sampling rate (samples per second), as a float.

getBufferSize()

Return the current buffer size (samples per buffer), as an integer.

allowAutoStart([switch])

When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.

useWaitTimeOnStop()

When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.

addLinkedObject(x)

When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.

setStopDelay(x)

Set a specific waiting time when calling the stop method on this object.

getStopDelay()

Return the waiting time applied when calling the stop method on this object.

__iter__()

__next__()

next()

Alias for __next__ method.

__getitem__(i)

__setitem__(i, x)

__len__()

__repr__()

Return repr(self).

__dir__()

Default dir() implementation.

Private Data Attributes:

Inherited from PyoObject

_STREAM_TYPE

Inherited from PyoObjectBase

_STREAM_TYPE

Private Methods:

Inherited from PyoObject

_init_play()

_reset_from_set([attr])

Inherited from PyoObjectBase

_autoplay([dur, delay])

_autostop([wait])


setDist(x)[source]

Replace the dist attribute.

Args
x: string or int

new dist attribute.

setScale(x)[source]

Replace the scale attribute.

Possible values are:
  1. Midi notes

  2. Hertz

  3. transposition factor (centralkey is (minrange + maxrange) / 2

Args
x: int {0, 1, 2}

new scale attribute.

setRange(mini, maxi)[source]

Replace the mrange attribute.

Args
mini: int

minimum output midi range.

maxi: int

maximum output midi range.

setX1(x)[source]

Replace the x1 attribute.

Args
x: float or PyoObject

new x1 attribute.

setX2(x)[source]

Replace the x2 attribute.

Args
x: float or PyoObject

new x2 attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

ctrl(map_list=None, title=None, wxnoserver=False)[source]

Opens a sliders window to control the parameters of the object. SLMap has a dataOnly attribute to identify parameters that don’t audio signal as control but only discrete values.

If a list of values are given to a parameter, a multisliders will be used to control each stream independently.

Args
map_list: list of SLMap objects, optional

Users defined set of parameters scaling. There is default scaling for each object that accept ctrl method.

title: string, optional

Title of the window. If none is provided, the name of the class is used.

wxnoserver: boolean, optional

With wxPython graphical toolkit, if True, tells the interpreter that there will be no server window.

If wxnoserver is set to True, the interpreter will not wait for the server GUI before showing the controller window.

property dist

string or int. Distribution type.

property freq

float or PyoObject. Polling frequency.

property x1

float or PyoObject. First parameter.

property x2

float or PyoObject. Second parameter.

property scale

int. Output format.