Table Processing

Set of objects to perform operations on PyoTableObjects.

PyoTableObjects are 1 dimension containers. They can be used to store audio samples or algorithmic sequences for future uses.

Granulator

class Granulator(table, env, pitch=1, pos=0, dur=0.1, grains=8, basedur=0.1, mul=1, add=0)[source]

Granular synthesis generator.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

env: PyoTableObject

Table containing the grain envelope.

pitch: float or PyoObject, optional

Overall pitch of the granulator. This value transpose the pitch of all grains. Defaults to 1.

pos: float or PyoObject, optional

Pointer position, in samples, in the waveform table. Each grain sampled the current value of this stream at the beginning of its envelope and hold it until the end of the grain. Defaults to 0.

dur: float or PyoObject, optional

Duration, in seconds, of the grain. Each grain sampled the current value of this stream at the beginning of its envelope and hold it until the end of the grain. Defaults to 0.1.

grains: int, optional

Number of grains. Defaults to 8.

basedur: float, optional

Base duration used to calculate the speed of the pointer to read the grain at its original pitch. By changing the value of the dur parameter, transposition per grain can be generated. Defaults to 0.1.

>>> s = Server().boot()
>>> s.start()
>>> snd = SndTable(SNDS_PATH + "/transparent.aif")
>>> env = HannTable()
>>> pos = Phasor(snd.getRate()*.25, 0, snd.getSize())
>>> dur = Noise(.001, .1)
>>> g = Granulator(snd, env, [1, 1.001], pos, dur, 24, mul=.1).out()

Public Data Attributes:

table

PyoTableObject.

env

PyoTableObject.

pitch

float or PyoObject.

pos

float or PyoObject.

dur

float or PyoObject.

grains

int.

basedur

float.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, env[, pitch, pos, dur, ...])

setTable(x)

Replace the table attribute.

setEnv(x)

Replace the env attribute.

setPitch(x)

Replace the pitch attribute.

setPos(x)

Replace the pos attribute.

setDur(x)

Replace the dur attribute.

setGrains(x)

Replace the grains attribute.

setBaseDur(x)

Replace the basedur attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, env[, pitch, pos, dur, ...])

__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__(table, env[, pitch, pos, dur, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setEnv(x)[source]

Replace the env attribute.

Args
x: PyoTableObject

new env attribute.

setPitch(x)[source]

Replace the pitch attribute.

Args
x: float or PyoObject

new pitch attribute.

setPos(x)[source]

Replace the pos attribute.

Args
x: float or PyoObject

new pos attribute.

setDur(x)[source]

Replace the dur attribute.

Args
x: float or PyoObject

new dur attribute.

setGrains(x)[source]

Replace the grains attribute.

Args
x: int

new grains attribute.

setBaseDur(x)[source]

Replace the basedur attribute.

Args
x: float

new basedur 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 table

PyoTableObject. Table containing the waveform samples.

property env

PyoTableObject. Table containing the grain envelope.

property pitch

float or PyoObject. Overall pitch of the granulator.

property pos

float or PyoObject. Position of the pointer in the sound table.

property dur

float or PyoObject. Duration, in seconds, of the grain.

property grains

int. Number of grains.

property basedur

float. Duration to read the grain at its original pitch.

Granule

class Granule(table, env, dens=50, pitch=1, pos=0, dur=0.1, mul=1, add=0)[source]

Another granular synthesis generator.

As of pyo 0.7.4, users can call the setSync method to change the granulation mode (either synchronous or asynchronous) of the object.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

env: PyoTableObject

Table containing the grain envelope.

dens: float or PyoObject, optional

Density of grains per second. Defaults to 50.

pitch: float or PyoObject, optional

Pitch of the grains. A new grain gets the current value of pitch as its reading speed. Defaults to 1.

pos: float or PyoObject, optional

Pointer position, in samples, in the waveform table. Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.

dur: float or PyoObject, optional

Duration, in seconds, of the grain. Each grain samples the current value of this stream at the beginning of its envelope and hold it until the end of the grain. Defaults to 0.1.

>>> s = Server().boot()
>>> s.start()
>>> snd = SndTable(SNDS_PATH+"/transparent.aif")
>>> end = snd.getSize() - s.getSamplingRate() * 0.2
>>> env = HannTable()
>>> pos = Randi(min=0, max=1, freq=[0.25, 0.3], mul=end)
>>> dns = Randi(min=10, max=30, freq=.1)
>>> pit = Randi(min=0.99, max=1.01, freq=100)
>>> grn = Granule(snd, env, dens=dns, pitch=pit, pos=pos, dur=.2, mul=.1).out()

Public Data Attributes:

table

PyoTableObject.

env

PyoTableObject.

dens

float or PyoObject.

pitch

float or PyoObject.

pos

float or PyoObject.

dur

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, env[, dens, pitch, pos, ...])

setTable(x)

Replace the table attribute.

setEnv(x)

Replace the env attribute.

setDens(x)

Replace the dens attribute.

setPitch(x)

Replace the pitch attribute.

setPos(x)

Replace the pos attribute.

setDur(x)

Replace the dur attribute.

setSync(x)

Sets the granulation mode, synchronous or asynchronous.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, env[, dens, pitch, pos, ...])

__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__(table, env[, dens, pitch, pos, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setEnv(x)[source]

Replace the env attribute.

Args
x: PyoTableObject

new env attribute.

setDens(x)[source]

Replace the dens attribute.

Args
x: float or PyoObject

new dens attribute.

setPitch(x)[source]

Replace the pitch attribute.

Args
x: float or PyoObject

new pitch attribute.

setPos(x)[source]

Replace the pos attribute.

Args
x: float or PyoObject

new pos attribute.

setDur(x)[source]

Replace the dur attribute.

Args
x: float or PyoObject

new dur attribute.

setSync(x)[source]

Sets the granulation mode, synchronous or asynchronous.

Args
x: boolean

True means synchronous granulation (the default) while False means asynchronous.

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 table

PyoTableObject. Table containing the waveform samples.

property env

PyoTableObject. Table containing the grain envelope.

property dens

float or PyoObject. Density of grains per second.

property pitch

float or PyoObject. Transposition factor of the grain.

property pos

float or PyoObject. Position of the pointer in the sound table.

property dur

float or PyoObject. Duration, in seconds, of the grain.

Lookup

class Lookup(table, index, mul=1, add=0)[source]

Uses table to do waveshaping on an audio signal.

Lookup uses a table to apply waveshaping on an input signal index. The index must be between -1 and 1, it is automatically scaled between 0 and len(table)-1 and is used as a position pointer in the table.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the transfert function.

index: PyoObject

Audio signal, between -1 and 1, internally converted to be used as the index position in the table.

>>> s = Server().boot()
>>> s.start()
>>> lfo = Sine(freq=[.15,.2], mul=.2, add=.25)
>>> a = Sine(freq=[100,150], mul=lfo)
>>> t = CosTable([(0,-1),(3072,-0.85),(4096,0),(5520,.85),(8192,1)])
>>> b = Lookup(table=t, index=a, mul=.5-lfo).out()

Public Data Attributes:

table

PyoTableObject.

index

PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, index[, mul, add])

setTable(x)

Replace the table attribute.

setIndex(x)

Replace the index attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, index[, 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__(table, index[, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setIndex(x)[source]

Replace the index attribute.

Args
x: PyoObject

new index 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 table

PyoTableObject. Table containing the transfert function.

property index

PyoObject. Audio input used as the table index.

Looper

class Looper(table, pitch=1, start=0, dur=1.0, xfade=20, mode=1, xfadeshape=0, startfromloop=False, interp=2, autosmooth=False, mul=1, add=0)[source]

Crossfading looper.

Looper reads audio from a PyoTableObject and plays it back in a loop with user-defined pitch, start time, duration and crossfade time. The mode argument allows the user to choose different looping modes.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

pitch: float or PyoObject, optional

Transposition factor. 1 is normal pitch, 0.5 is one octave lower, 2 is one octave higher. Negative values are not allowed. Defaults to 1.

start: float or PyoObject, optional

Starting point, in seconds, of the loop, updated only once per loop cycle. Defaults to 0.

dur: float or PyoObject, optional

Duration, in seconds, of the loop, updated only once per loop cycle. Defaults to 1.

xfade: float or PyoObject {0 -> 50}, optional

Percent of the loop time used to crossfade readers, updated only once per loop cycle and clipped between 0 and 50. Defaults to 20.

mode: int {0, 1, 2, 3}, optional
Loop modes. Defaults to 1.
  1. no loop

  2. forward

  3. backward

  4. back-and-forth

xfadeshape: int {0, 1, 2}, optional
Crossfade envelope shape. Defaults to 0.
  1. linear

  2. equal power

  3. sigmoid

startfromloop: boolean, optional

If True, reading will begin directly at the loop start point. Otherwise, it begins at the beginning of the table. Defaults to False.

interp: int {1, 2, 3, 4}, optional
Choice of the interpolation method. Defaults to 2.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

autosmooth: boolean, optional

If True, a lowpass filter, following the pitch, is applied on the output signal to reduce the quantization noise produced by very low transpositions. Defaults to False.

Note

Looper will send a trigger signal every new playback starting point (i.e. when the object is activated and at the beginning of the crossfade of a loop. User can retrieve the trigger stream by calling obj[‘trig’].

Looper also outputs a time stream, given the current position of the reading pointer, normalized between 0.0 and 1.0 (1.0 means the beginning of the crossfade), inside the loop. User can retrieve the time stream by calling obj[‘time’]. New in version 0.8.1.

See also

Granulator, Pointer

>>> s = Server().boot()
>>> s.start()
>>> tab = SndTable(SNDS_PATH + '/transparent.aif')
>>> pit = Choice(choice=[.5,.75,1,1.25,1.5], freq=[3,4])
>>> start = Phasor(freq=.2, mul=tab.getDur())
>>> dur = Choice(choice=[.0625,.125,.125,.25,.33], freq=4)
>>> a = Looper(table=tab, pitch=pit, start=start, dur=dur, startfromloop=True, mul=.25).out()

Public Data Attributes:

table

PyoTableObject.

pitch

float or PyoObject.

start

float or PyoObject.

dur

float or PyoObject.

xfade

float or PyoObject.

xfadeshape

int.

startfromloop

boolean.

mode

int.

interp

int.

autosmooth

boolean.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table[, pitch, start, dur, xfade, ...])

__getitem__(i)

stop([wait])

Stop processing.

setTable(x)

Replace the table attribute.

setPitch(x)

Replace the pitch attribute.

setStart(x)

Replace the start attribute.

setDur(x)

Replace the dur attribute.

setXfade(x)

Replace the xfade attribute.

setXfadeShape(x)

Replace the xfadeshape attribute.

setStartFromLoop(x)

Replace the startfromloop attribute.

setMode(x)

Replace the mode attribute.

setInterp(x)

Replace the interp attribute.

setAutoSmooth(x)

Replace the autosmooth attribute.

reset()

Resets internal reading pointers to 0.

loopnow()

Sarts a new loop immediately.

appendFadeTime(x)

Change the position of the crossfade regarding loop duration.

fadeInSeconds(x)

Change the crossfade time unit (xfade unit type).

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table[, pitch, start, dur, xfade, ...])

__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__(table[, pitch, start, dur, xfade, ...])

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])


stop(wait=0)[source]

Stop processing.

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

Args
wait: float, optional

Delay, in seconds, before the process is actually stopped. If autoStartChildren is activated in the Server, this value is propagated to the children objects. Defaults to 0.

Note

if the method setStopDelay(x) was called before calling stop(wait) with a positive wait value, the wait value won’t overwrite the value given to setStopDelay for the current object, but will be the one propagated to children objects. This allow to set a waiting time for a specific object with setStopDelay whithout changing the global delay time given to the stop method.

Fader and Adsr objects ignore waiting time given to the stop method because they already implement a delayed processing triggered by the stop call.

setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setPitch(x)[source]

Replace the pitch attribute.

Args
x: float or PyoObject

new pitch attribute.

setStart(x)[source]

Replace the start attribute.

Args
x: float or PyoObject

new start attribute.

setDur(x)[source]

Replace the dur attribute.

Args
x: float or PyoObject

new dur attribute.

setXfade(x)[source]

Replace the xfade attribute.

Args
x: float or PyoObject

new xfade attribute.

setXfadeShape(x)[source]

Replace the xfadeshape attribute.

Args
x: int

new xfadeshape attribute.

setStartFromLoop(x)[source]

Replace the startfromloop attribute.

Args
x: boolean

new startfromloop attribute.

setMode(x)[source]

Replace the mode attribute.

Args
x: int

new mode attribute.

setInterp(x)[source]

Replace the interp attribute.

Args
x: int

new interp attribute.

setAutoSmooth(x)[source]

Replace the autosmooth attribute.

Args
x: boolean

new autosmooth attribute.

reset()[source]

Resets internal reading pointers to 0.

loopnow()[source]

Sarts a new loop immediately.

appendFadeTime(x)[source]

Change the position of the crossfade regarding loop duration.

Args
x: boolean

If 0 (the default), the crossfade duration lies inside the loop duration, producing a loop that is shorter than the dur value.

If 1, the crossfade starts after the loop duration, expecting samples after the loop to perform the fadeout. This mode gives a loop of a length of the dur value.

fadeInSeconds(x)[source]

Change the crossfade time unit (xfade unit type).

Args
x: boolean

If 0 (the default), the crossfade duration (xfade value) is a percent of the loop time, between 0 and 50.

If 1, the crossfade duration (xfade value) is set in seconds, between 0 and half the loop length.

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 table

PyoTableObject. Table containing the waveform samples.

property pitch

float or PyoObject. Transposition factor.

property start

float or PyoObject. Loop start position in seconds.

property dur

float or PyoObject. Loop duration in seconds.

property xfade

float or PyoObject. Crossfade duration in percent.

property xfadeshape

int. Crossfade envelope.

property startfromloop

boolean. Starts from loop point if True, otherwise starts from beginning of the sound.

property mode

int. Looping mode.

property interp

int. Interpolation method.

property autosmooth

boolean. Activates a lowpass filter applied on output signal.

Osc

class Osc(table, freq=1000, phase=0, interp=2, mul=1, add=0)[source]

A simple oscillator reading a waveform table.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

freq: float or PyoObject, optional

Frequency in cycles per second. Defaults to 1000.

phase: float or PyoObject, optional

Phase of sampling, expressed as a fraction of a cycle (0 to 1). Defaults to 0.

interp: int, optional
Choice of the interpolation method. Defaults to 2.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

See also

Phasor, Sine

>>> s = Server().boot()
>>> s.start()
>>> t = HarmTable([1,0,.33,0,.2,0,.143,0,.111,0,.091])
>>> a = Osc(table=t, freq=[100,99.2], mul=.2).out()

Public Data Attributes:

table

PyoTableObject.

freq

float or PyoObject.

phase

float or PyoObject.

interp

int {1, 2, 3, 4}.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table[, freq, phase, interp, mul, add])

setTable(x)

Replace the table attribute.

setFreq(x)

Replace the freq attribute.

setPhase(x)

Replace the phase attribute.

setInterp(x)

Replace the interp attribute.

reset()

Resets current phase to 0.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table[, freq, phase, interp, 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__(table[, freq, phase, interp, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

setPhase(x)[source]

Replace the phase attribute.

Args
x: float or PyoObject

new phase attribute.

setInterp(x)[source]

Replace the interp attribute.

Args
x: int {1, 2, 3, 4}

new interp attribute.

reset()[source]

Resets current phase to 0.

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 table

PyoTableObject. Table containing the waveform samples.

property freq

float or PyoObject. Frequency in cycles per second.

property phase

float or PyoObject. Phase of sampling.

property interp

int {1, 2, 3, 4}. Interpolation method.

OscBank

class OscBank(table, freq=100, spread=1, slope=0.9, frndf=1, frnda=0, arndf=1, arnda=0, num=24, fjit=False, mul=1, add=0)[source]

Any number of oscillators reading a waveform table.

OscBank mixes the output of any number of oscillators. The frequencies of each oscillator is controlled with two parameters, the base frequency freq and a coefficient of expansion spread. Frequencies are computed with the following formula (n is the order of the partial):

f_n = freq + freq * spread * n

The frequencies and amplitudes can be modulated by two random generators with interpolation (each partial have a different set of randoms).

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

freq: float or PyoObject, optional

Base frequency in cycles per second. Defaults to 100.

spread: float or PyoObject, optional

Coefficient of expansion used to compute partial frequencies. If spread is 0, all partials will be at the base frequency. A value of 1 will generate integer harmonics, a value of 2 will skip even harmonics and non-integer values will generate different series of inharmonic frequencies. Defaults to 1.

slope: float or PyoObject, optional

specifies the multiplier in the series of amplitude coefficients. This is a power series: the nth partial will have an amplitude of (slope ** n), i.e. strength values trace an exponential curve. Defaults to 1.

frndf: float or PyoObject, optional

Frequency, in cycle per second, of the frequency modulations. Defaults to 1.

frnda: float or PyoObject, optional

Maximum frequency deviation (positive and negative) in portion of the partial frequency. A value of 1 means that the frequency can drift from 0 Hz to twice the partial frequency. A value of 0 deactivates the frequency deviations. Defaults to 0.

arndf: float or PyoObject, optional

Frequency, in cycle per second, of the amplitude modulations. Defaults to 1.

arnda: float or PyoObject, optional

Amount of amplitude deviation. 0 deactivates the amplitude modulations and 1 gives full amplitude modulations. Defaults to 0.

num: int, optional

Number of oscillators. Available at initialization only. Defaults to 24.

fjit: boolean, optional

If True, a small jitter is added to the frequency of each partial. For a large number of oscillators and a very small spread, the periodicity between partial frequencies can cause very strange artefact. Adding a jitter breaks the periodicity. Defaults to False.

See also

Osc

Note

Altough parameters can be audio signals, values are sampled only once per buffer size. To avoid artefacts, it is recommended to keep variations at low rate (< 20 Hz).

>>> s = Server().boot()
>>> s.start()
>>> ta = HarmTable([1,.3,.2])
>>> tb = HarmTable([1])
>>> f = Fader(fadein=.1).play()
>>> a = OscBank(ta,100,spread=0,frndf=.25,frnda=.01,num=[10,10],fjit=True,mul=f*0.5).out()
>>> b = OscBank(tb,250,spread=.25,slope=.8,arndf=4,arnda=1,num=[10,10],mul=f*0.4).out()

Public Data Attributes:

table

PyoTableObject.

freq

float or PyoObject.

spread

float or PyoObject.

slope

float or PyoObject.

frndf

float or PyoObject.

frnda

float or PyoObject.

arndf

float or PyoObject.

arnda

float or PyoObject.

fjit

boolean.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table[, freq, spread, slope, ...])

setTable(x)

Replace the table attribute.

setFreq(x)

Replace the freq attribute.

setSpread(x)

Replace the spread attribute.

setSlope(x)

Replace the slope attribute.

setFrndf(x)

Replace the frndf attribute.

setFrnda(x)

Replace the frnda attribute.

setArndf(x)

Replace the arndf attribute.

setArnda(x)

Replace the arnda attribute.

setFjit(x)

Replace the fjit attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table[, freq, spread, slope, ...])

__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__(table[, freq, spread, slope, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

setSpread(x)[source]

Replace the spread attribute.

Args
x: float or PyoObject

new spread attribute.

setSlope(x)[source]

Replace the slope attribute.

Args
x: float or PyoObject

new slope attribute.

setFrndf(x)[source]

Replace the frndf attribute.

Args
x: float or PyoObject

new frndf attribute.

setFrnda(x)[source]

Replace the frnda attribute.

Args
x: float or PyoObject

new frnda attribute.

setArndf(x)[source]

Replace the arndf attribute.

Args
x: float or PyoObject

new arndf attribute.

setArnda(x)[source]

Replace the arnda attribute.

Args
x: float or PyoObject

new arnda attribute.

setFjit(x)[source]

Replace the fjit attribute.

Args
x: boolean

new fjit 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 table

PyoTableObject. Table containing the waveform samples.

property freq

float or PyoObject. Frequency in cycles per second.

property spread

float or PyoObject. Frequency expansion factor.

property slope

float or PyoObject. Multiplier in the series of amplitudes.

property frndf

float or PyoObject. Frequency of the frequency modulations.

property frnda

float or PyoObject. Maximum frequency deviation from 0 to 1.

property arndf

float or PyoObject. Frequency of the amplitude modulations.

property arnda

float or PyoObject. Amount of amplitude deviation from 0 to 1.

property fjit

boolean. Jitter added to the parial frequencies.

OscLoop

class OscLoop(table, freq=1000, feedback=0, mul=1, add=0)[source]

A simple oscillator with feedback reading a waveform table.

OscLoop reads a waveform table with linear interpolation and feedback control. The oscillator output, multiplied by feedback, is added to the position increment and can be used to control the brightness of the oscillator.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

freq: float or PyoObject, optional

Frequency in cycles per second. Defaults to 1000.

feedback: float or PyoObject, optional

Amount of the output signal added to position increment, between 0 and 1. Controls the brightness. Defaults to 0.

See also

Osc, SineLoop

>>> s = Server().boot()
>>> s.start()
>>> t = HarmTable([1,0,.33,0,.2,0,.143])
>>> lfo = Sine(.5, 0, .05, .05)
>>> a = OscLoop(table=t, freq=[100,99.3], feedback=lfo, mul=.2).out()

Public Data Attributes:

table

PyoTableObject.

freq

float or PyoObject.

feedback

float or PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table[, freq, feedback, mul, add])

setTable(x)

Replace the table attribute.

setFreq(x)

Replace the freq attribute.

setFeedback(x)

Replace the feedback attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table[, freq, feedback, 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__(table[, freq, feedback, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

setFeedback(x)[source]

Replace the feedback attribute.

Args
x: float or PyoObject

new feedback 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 table

PyoTableObject. Table containing the waveform samples.

property freq

float or PyoObject. Frequency in cycles per second.

property feedback

float or PyoObject. Brightness control.

OscTrig

class OscTrig(table, trig, freq=1000, phase=0, interp=2, mul=1, add=0)[source]

An oscillator reading a waveform table with sample accurate reset signal.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

trig: PyoObject

Trigger signal. Reset the table pointer position to zero on each trig.

freq: float or PyoObject, optional

Frequency in cycles per second. Defaults to 1000.

phase: float or PyoObject, optional

Phase of sampling, expressed as a fraction of a cycle (0 to 1). Defaults to 0.

interp: int, optional
Choice of the interpolation method. Defaults to 2.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

See also

Osc, Phasor, Sine

>>> s = Server().boot()
>>> s.start()
>>> tab = SndTable(SNDS_PATH+"/transparent.aif")
>>> tim = Phasor([-0.2,-0.25], mul=tab.getDur()-0.005, add=0.005)
>>> rst = Metro(tim).play()
>>> a = OscTrig(tab, rst, freq=tab.getRate(), mul=.4).out()

Public Data Attributes:

table

PyoTableObject.

trig

PyoObject.

freq

float or PyoObject.

phase

float or PyoObject.

interp

int {1, 2, 3, 4}.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, trig[, freq, phase, interp, ...])

setTable(x)

Replace the table attribute.

setTrig(x)

Replace the trig attribute.

setFreq(x)

Replace the freq attribute.

setPhase(x)

Replace the phase attribute.

setInterp(x)

Replace the interp attribute.

reset()

Resets current phase to 0.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, trig[, freq, phase, interp, ...])

__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__(table, trig[, freq, phase, interp, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setTrig(x)[source]

Replace the trig attribute.

Args
x: PyoObject

new trig attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

setPhase(x)[source]

Replace the phase attribute.

Args
x: float or PyoObject

new phase attribute.

setInterp(x)[source]

Replace the interp attribute.

Args
x: int {1, 2, 3, 4}

new interp attribute.

reset()[source]

Resets current phase to 0.

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 table

PyoTableObject. Table containing the waveform samples.

property trig

PyoObject. Trigger signal. Reset pointer position to zero

property freq

float or PyoObject. Frequency in cycles per second.

property phase

float or PyoObject. Phase of sampling.

property interp

int {1, 2, 3, 4}. Interpolation method.

Particle

class Particle(table, env, dens=50, pitch=1, pos=0, dur=0.1, dev=0.01, pan=0.5, chnls=1, mul=1, add=0)[source]

A full control granular synthesis generator.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

env: PyoTableObject

Table containing the grain envelope.

dens: float or PyoObject, optional

Density of grains per second. Defaults to 50.

pitch: float or PyoObject, optional

Pitch of the grains. Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 1.

pos: float or PyoObject, optional

Pointer position, in samples, in the waveform table. Each grain sampled the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.

dur: float or PyoObject, optional

Duration, in seconds, of the grain. Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.1.

dev: float or PyoObject, optional

Maximum deviation of the starting time of the grain, between 0 and 1 (relative to the current duration of the grain). Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.01.

pan: float or PyoObject, optional

Panning factor of the grain (if chnls=1, this value is skipped). Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.5.

chnls: integer, optional

Number of output channels per audio stream (if chnls=2 and a stereo sound table is given at the table argument, the objet will create 4 output streams, 2 per table channel). Available at initialization only. Defaults to 1.

Note

Particle object compensate for the difference between sampling rate of the loaded sound and the current sampling rate of the Server.

>>> s = Server().boot()
>>> s.start()
>>> snd = SndTable(SNDS_PATH+"/transparent.aif")
>>> end = snd.getSize() - s.getSamplingRate() * 0.25
>>> env = HannTable()
>>> dns = Randi(min=5, max=100, freq=.1)
>>> pit = Randh(min=0.99, max=1.01, freq=100)
>>> pos = Randi(min=0, max=1, freq=0.25, mul=end)
>>> dur = Randi(min=0.01, max=0.25, freq=0.15)
>>> dev = Randi(min=0, max=1, freq=0.2)
>>> pan = Noise(0.5, 0.5)
>>> grn = Particle(snd, env, dns, pit, pos, dur, dev, pan, chnls=2, mul=.2).out()

Public Data Attributes:

table

PyoTableObject.

env

PyoTableObject.

dens

float or PyoObject.

pitch

float or PyoObject.

pos

float or PyoObject.

dur

float or PyoObject.

dev

float or PyoObject.

pan

float or PyoObject.Panning of the grain.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, env[, dens, pitch, pos, ...])

setTable(x)

Replace the table attribute.

setEnv(x)

Replace the env attribute.

setDens(x)

Replace the dens attribute.

setPitch(x)

Replace the pitch attribute.

setPos(x)

Replace the pos attribute.

setDur(x)

Replace the dur attribute.

setDev(x)

Replace the dev attribute.

setPan(x)

Replace the pan attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, env[, dens, pitch, pos, ...])

__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__(table, env[, dens, pitch, pos, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setEnv(x)[source]

Replace the env attribute.

Args
x: PyoTableObject

new env attribute.

setDens(x)[source]

Replace the dens attribute.

Args
x: float or PyoObject

new dens attribute.

setPitch(x)[source]

Replace the pitch attribute.

Args
x: float or PyoObject

new pitch attribute.

setPos(x)[source]

Replace the pos attribute.

Args
x: float or PyoObject

new pos attribute.

setDur(x)[source]

Replace the dur attribute.

Args
x: float or PyoObject

new dur attribute.

setDev(x)[source]

Replace the dev attribute.

Args
x: float or PyoObject

new dev attribute.

setPan(x)[source]

Replace the pan attribute.

Args
x: float or PyoObject

new pan 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 table

PyoTableObject. Table containing the waveform samples.

property env

PyoTableObject. Table containing the grain envelope.

property dens

float or PyoObject. Density of grains per second.

property pitch

float or PyoObject. Transposition factor of the grain.

property pos

float or PyoObject. Position of the pointer in the sound table.

property dur

float or PyoObject. Duration, in seconds, of the grain.

property dev

float or PyoObject. Deviation of the starting point of the grain in the table.

property pan

float or PyoObject.Panning of the grain.

Particle2

class Particle2(table, env, dens=50, pitch=1, pos=0, dur=0.1, dev=0.01, pan=0.5, filterfreq=18000, filterq=0.7, filtertype=0, chnls=1, mul=1, add=0)[source]

An even more full control granular synthesis generator.

This granulator object offers all the same controls as the Particle object with additionally an independently controllable filter per grain. The filters use the same implementation as the Biquad object.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

env: PyoTableObject

Table containing the grain envelope.

dens: float or PyoObject, optional

Density of grains per second. Defaults to 50.

pitch: float or PyoObject, optional

Pitch of the grains. Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 1.

pos: float or PyoObject, optional

Pointer position, in samples, in the waveform table. Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.

dur: float or PyoObject, optional

Duration, in seconds, of the grain. Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.1.

dev: float or PyoObject, optional

Maximum deviation of the starting time of the grain, between 0 and 1 (relative to the current duration of the grain). Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.01.

pan: float or PyoObject, optional

Panning factor of the grain (if chnls=1, this value is skipped). Each grain samples the current value of this stream at the beginning of its envelope and holds it until the end of the grain. Defaults to 0.5.

filterfreq: float or PyoObject, optional

Center or cutoff frequency of the grain filter. Each grain samples the current value of this stream at the beginning of its envelope and hold it until the end of the grain. Defaults to 18000.

filterq: float or PyoObject, optional

Q of the grain filter. Each grain samples the current value of this stream at the beginning of its envelope and hold it until the end of the grain. Defaults to 0.7.

filtertype: float or PyoObject, optional

Type of the grain filter. Each grain samples the current value of this stream at the beginning of its envelope and hold it until the end of the grain. Thw value is rounded to the nearest integer. Possible values are:

  1. lowpass (default)

  2. highpass

  3. bandpass

  4. bandstop

  5. allpass

chnls: integer, optional

Number of output channels per audio stream (if chnls=2 and a stereo sound table is given at the table argument, the objet will create 4 output streams, 2 per table channel). Available at initialization only. Defaults to 1.

Note

Particle object compensate for the difference between sampling rate of the loaded sound and the current sampling rate of the Server.

>>> s = Server().boot()
>>> s.start()
>>> snd = SndTable(SNDS_PATH+"/transparent.aif")
>>> end = snd.getSize() - s.getSamplingRate() * 0.25
>>> env = HannTable()
>>> dns = Randi(min=8, max=24, freq=.1)
>>> pit = Randh(min=0.49, max=0.51, freq=100)
>>> pos = Sine(0.05).range(0, end)
>>> dur = Randi(min=0.05, max=0.15, freq=0.15)
>>> dev = 0.001
>>> pan = Noise(0.5, 0.5)
>>> cf = Sine(0.07).range(75, 125)
>>> fcf = Choice(list(range(1, 40)), freq=150, mul=cf)
>>> grn = Particle2(snd, env, dns, pit, pos, dur, dev, pan, fcf, 20, 2, chnls=2, mul=.3)
>>> grn.out()

Public Data Attributes:

table

PyoTableObject.

env

PyoTableObject.

dens

float or PyoObject.

pitch

float or PyoObject.

pos

float or PyoObject.

dur

float or PyoObject.

dev

float or PyoObject.

pan

float or PyoObject.Panning of the grain.

filterfreq

float or PyoObject.Grain's filter center/cutoff frequency.

filterq

float or PyoObject.Grain's filter Q.

filtertype

float or PyoObject.Grain's filter type.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, env[, dens, pitch, pos, ...])

setTable(x)

Replace the table attribute.

setEnv(x)

Replace the env attribute.

setDens(x)

Replace the dens attribute.

setPitch(x)

Replace the pitch attribute.

setPos(x)

Replace the pos attribute.

setDur(x)

Replace the dur attribute.

setDev(x)

Replace the dev attribute.

setPan(x)

Replace the pan attribute.

setFilterfreq(x)

Replace the filterfreq attribute.

setFilterq(x)

Replace the filterq attribute.

setFiltertype(x)

Replace the filtertype attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, env[, dens, pitch, pos, ...])

__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__(table, env[, dens, pitch, pos, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setEnv(x)[source]

Replace the env attribute.

Args
x: PyoTableObject

new env attribute.

setDens(x)[source]

Replace the dens attribute.

Args
x: float or PyoObject

new dens attribute.

setPitch(x)[source]

Replace the pitch attribute.

Args
x: float or PyoObject

new pitch attribute.

setPos(x)[source]

Replace the pos attribute.

Args
x: float or PyoObject

new pos attribute.

setDur(x)[source]

Replace the dur attribute.

Args
x: float or PyoObject

new dur attribute.

setDev(x)[source]

Replace the dev attribute.

Args
x: float or PyoObject

new dev attribute.

setPan(x)[source]

Replace the pan attribute.

Args
x: float or PyoObject

new pan attribute.

setFilterfreq(x)[source]

Replace the filterfreq attribute.

Args
x: float or PyoObject

new filterfreq attribute.

setFilterq(x)[source]

Replace the filterq attribute.

Args
x: float or PyoObject

new filterq attribute.

setFiltertype(x)[source]

Replace the filtertype attribute.

Args
x: float or PyoObject

new filtertype 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 table

PyoTableObject. Table containing the waveform samples.

property env

PyoTableObject. Table containing the grain envelope.

property dens

float or PyoObject. Density of grains per second.

property pitch

float or PyoObject. Transposition factor of the grain.

property pos

float or PyoObject. Position of the pointer in the sound table.

property dur

float or PyoObject. Duration, in seconds, of the grain.

property dev

float or PyoObject. Deviation of the starting point of the grain in the table.

property pan

float or PyoObject.Panning of the grain.

property filterfreq

float or PyoObject.Grain’s filter center/cutoff frequency.

property filterq

float or PyoObject.Grain’s filter Q.

property filtertype

float or PyoObject.Grain’s filter type.

Pointer

class Pointer(table, index, mul=1, add=0)[source]

Table reader with control on the pointer position.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

index: PyoObject

Normalized position in the table between 0 and 1.

>>> s = Server().boot()
>>> s.start()
>>> t = SndTable(SNDS_PATH + '/transparent.aif')
>>> freq = t.getRate()
>>> p = Phasor(freq=[freq*0.5, freq*0.45])
>>> a = Pointer(table=t, index=p, mul=.3).out()

Public Data Attributes:

table

PyoTableObject.

index

PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, index[, mul, add])

setTable(x)

Replace the table attribute.

setIndex(x)

Replace the index attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, index[, 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__(table, index[, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setIndex(x)[source]

Replace the index attribute.

Args
x: PyoObject

new index 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 table

PyoTableObject. Table containing the waveform samples.

property index

PyoObject. Index pointer position in the table.

Pointer2

class Pointer2(table, index, interp=4, autosmooth=True, mul=1, add=0)[source]

High quality table reader with control on the pointer position.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

index: PyoObject

Normalized position in the table between 0 and 1.

interp: int {1, 2, 3, 4}, optional
Choice of the interpolation method. Defaults to 4.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

autosmooth: boolean, optional

If True, a lowpass filter, following the pitch, is applied on

the output signal to reduce the quantization noise produced

by very low transpositions. Defaults to True.

>>> s = Server().boot()
>>> s.start()
>>> t = SndTable(SNDS_PATH + '/transparent.aif')
>>> freq = t.getRate()
>>> p = Phasor(freq=[freq*0.5, freq*0.45])
>>> a = Pointer2(table=t, index=p, mul=.3).out()

Public Data Attributes:

table

PyoTableObject.

index

PyoObject.

interp

int {1, 2, 3, 4}.

autosmooth

boolean.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, index[, interp, autosmooth, ...])

setTable(x)

Replace the table attribute.

setIndex(x)

Replace the index attribute.

setInterp(x)

Replace the interp attribute.

setAutoSmooth(x)

Replace the autosmooth attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, index[, interp, autosmooth, ...])

__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__(table, index[, interp, autosmooth, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setIndex(x)[source]

Replace the index attribute.

Args
x: PyoObject

new index attribute.

setInterp(x)[source]

Replace the interp attribute.

Args
x: int {1, 2, 3, 4}
new interp attribute.
  1. no interpolation

  2. linear interpolation

  3. cosine interpolation

  4. cubic interpolation (default)

setAutoSmooth(x)[source]

Replace the autosmooth attribute.

If True, a lowpass filter, following the playback speed, is applied on the output signal to reduce the quantization noise produced by very low transpositions.

Args
x: boolean

new autosmooth 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 table

PyoTableObject. Table containing the waveform samples.

property index

PyoObject. Index pointer position in the table.

property interp

int {1, 2, 3, 4}. Interpolation method.

property autosmooth

boolean. Quantization noise filter.

Pulsar

class Pulsar(table, env, freq=100, frac=0.5, phase=0, interp=2, mul=1, add=0)[source]

Pulsar synthesis oscillator.

Pulsar synthesis produces a train of sound particles called pulsars that can make rhythms or tones, depending on the fundamental frequency of the train. Varying the frac parameter changes the portion of the period assigned to the waveform and the portion of the period assigned to its following silence, but maintain the overall pulsar period. This results in an effect much like a sweeping band-pass filter.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

env: PyoTableObject

Table containing the envelope samples.

freq: float or PyoObject, optional

Frequency in cycles per second. Defaults to 100.

frac: float or PyoObject, optional

Fraction of the whole period (0 -> 1) given to the waveform. The rest will be filled with zeros. Defaults to 0.5.

phase: float or PyoObject, optional

Phase of sampling, expressed as a fraction of a cycle (0 to 1). Defaults to 0.

interp: int, optional
Choice of the interpolation method. Defaults to 2.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

See also

Osc

>>> s = Server().boot()
>>> s.start()
>>> w = HarmTable([1,0,.33,0,2,0,.143,0,.111])
>>> e = HannTable()
>>> lfo = Sine([.1,.15], mul=.2, add=.5)
>>> a = Pulsar(table=w, env=e, freq=80, frac=lfo, mul=.08).out()

Public Data Attributes:

table

PyoTableObject.

env

PyoTableObject.

freq

float or PyoObject.

frac

float or PyoObject.

phase

float or PyoObject.

interp

int {1, 2, 3, 4}.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, env[, freq, frac, phase, ...])

setTable(x)

Replace the table attribute.

setEnv(x)

Replace the env attribute.

setFreq(x)

Replace the freq attribute.

setFrac(x)

Replace the frac attribute.

setPhase(x)

Replace the phase attribute.

setInterp(x)

Replace the interp attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, env[, freq, frac, phase, ...])

__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__(table, env[, freq, frac, phase, ...])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setEnv(x)[source]

Replace the env attribute.

Args
x: PyoTableObject

new env attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

setFrac(x)[source]

Replace the frac attribute.

Args
x: float or PyoObject

new frac attribute.

setPhase(x)[source]

Replace the phase attribute.

Args
x: float or PyoObject

new phase attribute.

setInterp(x)[source]

Replace the interp attribute.

Args
x: int {1, 2, 3, 4}
Choice of the interpolation method.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

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 table

PyoTableObject. Table containing the waveform samples.

property env

PyoTableObject. Table containing the envelope samples.

property freq

float or PyoObject. Frequency in cycles per second.

property frac

float or PyoObject. Fraction of the period assigned to waveform.

property phase

float or PyoObject. Phase of sampling.

property interp

int {1, 2, 3, 4}. Interpolation method.

TableIndex

class TableIndex(table, index, mul=1, add=0)[source]

Table reader by sample position without interpolation.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the samples.

index: PyoObject

Position in the table, as integer audio stream, between 0 and table’s size - 1.

>>> s = Server().boot()
>>> s.start()
>>> import random
>>> notes = [midiToHz(random.randint(60,84)) for i in range(10)]
>>> tab = DataTable(size=10, init=notes)
>>> ind = RandInt(10, [4,8])
>>> pit = TableIndex(tab, ind)
>>> a = SineLoop(freq=pit, feedback = 0.05, mul=.2).out()

Public Data Attributes:

table

PyoTableObject.

index

PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, index[, mul, add])

setTable(x)

Replace the table attribute.

setIndex(x)

Replace the index attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, index[, 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__(table, index[, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setIndex(x)[source]

Replace the index attribute.

Args
x: PyoObject

new index 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 table

PyoTableObject. Table containing the samples.

property index

PyoObject. Position in the table.

TableMorph

class TableMorph(input, table, sources)[source]

Morphs between multiple PyoTableObjects.

Uses an index into a list of PyoTableObjects to morph between adjacent tables in the list. The resulting morphed function is written into the table object at the beginning of each buffer size. The tables in the list and the resulting table must be equal in size.

Parent

PyoObject

Args
input: PyoObject

Morphing index between 0 and 1. 0 is the first table in the list and 1 is the last.

table: NewTable

The table where to write morphed waveform.

sources: list of PyoTableObject

List of tables to interpolate from.

Note

The smaller size among the output table and the two current tables to interpolate is used to determine the number of samples to process. Using tables with different size can produce strange behaviours.

The out() method is bypassed. TableMorph returns no signal.

TableMorph has no mul and add attributes.

>>> s = Server(duplex=1).boot()
>>> s.start()
>>> t1 = HarmTable([1,.5,.33,.25,.2,.167,.143,.125,.111,.1,.091])
>>> t2 = HarmTable([1,0,.33,0,.2,0,.143,0,.111,0,.091])
>>> t3 = NewTable(length=8192./s.getSamplingRate(), chnls=1)
>>> lfo = Sine(.25, 0, .5, .5)
>>> mor = TableMorph(lfo, t3, [t1,t2])
>>> osc = Osc(t3, freq=[199.5,200], mul=.08).out()

Public Data Attributes:

input

PyoObject.

table

NewTable.

sources

list of PyoTableObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(input, table, sources)

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

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

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setInput(x[, fadetime])

Replace the input attribute.

setTable(x)

Replace the table attribute.

setSources(x)

Replace the sources attribute.

Inherited from PyoObject

__init__(input, table, sources)

__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__(input, table, sources)

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.

setMul(x)[source]

Replace the mul attribute.

Args
x: float or PyoObject

New mul attribute.

setAdd(x)[source]

Replace the add attribute.

Args
x: float or PyoObject

New add attribute.

setInput(x, fadetime=0.05)[source]

Replace the input attribute.

Args
x: PyoObject

New signal to process.

fadetime: float, optional

Crossfade time between old and new input. Defaults to 0.05.

setTable(x)[source]

Replace the table attribute.

Args
x: NewTable

new table attribute.

setSources(x)[source]

Replace the sources attribute.

Args
x: list of PyoTableObject

new sources attribute.

property input

PyoObject. Morphing index between 0 and 1.

property table

NewTable. The table where to write samples.

property sources

list of PyoTableObject. List of tables to interpolate from.

TablePut

class TablePut(input, table)[source]

Writes values, without repetitions, from an audio stream into a DataTable.

See DataTable to create an empty table.

TablePut takes an audio input and writes values into a DataTable but only when value changes. This allow to record only new values, without repetitions.

The play method is not called at the object creation time. It starts the recording into the table until the table is full. Calling the play method again restarts the recording and overwrites previously recorded values. The stop method stops the recording. Otherwise, the default behaviour is to record through the end of the table.

Parent

PyoObject

Args
input: PyoObject

Audio signal to write in the table.

table: DataTable

The table where to write values.

Note

The out() method is bypassed. TablePut returns no signal.

TablePut has no mul and add attributes.

TablePut will send a trigger signal at the end of the recording. User can retrieve the trigger streams by calling obj[‘trig’].

>>> s = Server().boot()
>>> s.start()
>>> t = DataTable(size=16)
>>> rnd = Choice(list(range(200, 601, 50)), freq=16)
>>> rec = TablePut(rnd, t).play()
>>> met = Metro(.125).play()
>>> ind = Counter(met, max=16)
>>> fr = TableIndex(t, ind, mul=[1,1.005])
>>> osc = SineLoop(fr, feedback=.08, mul=.3).out()

Public Data Attributes:

input

PyoObject.

table

DataTable.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(input, table)

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

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

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setInput(x[, fadetime])

Replace the input attribute.

setTable(x)

Replace the table attribute.

Inherited from PyoObject

__init__(input, table)

__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__(input, table)

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.

setMul(x)[source]

Replace the mul attribute.

Args
x: float or PyoObject

New mul attribute.

setAdd(x)[source]

Replace the add attribute.

Args
x: float or PyoObject

New add attribute.

setInput(x, fadetime=0.05)[source]

Replace the input attribute.

Args
x: PyoObject

New signal to process.

fadetime: float, optional

Crossfade time between old and new input. Defaults to 0.05.

setTable(x)[source]

Replace the table attribute.

Args
x: DataTable

new table attribute.

property input

PyoObject. Audio signal to write in the table.

property table

DataTable. The table where to write values.

TableRead

class TableRead(table, freq=1, loop=0, interp=2, mul=1, add=0)[source]

Simple waveform table reader.

Read sampled sound from a table, with optional looping mode.

The play() method starts the playback and is not called at the object creation time.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

freq: float or PyoObject, optional

Frequency in cycles per second. Defaults to 1.

loop: int {0, 1}, optional

Looping mode, 0 means off, 1 means on. Defaults to 0.

interp: int, optional
Choice of the interpolation method. Defaults to 2.
  1. no interpolation

  2. linear

  3. cosinus

  4. cubic

Note

TableRead will send a trigger signal at the end of the playback if loop is off or any time it wraps around if loop is on. User can retreive the trigger streams by calling obj[‘trig’]:

>>> tabr = TableRead(SNDS_PATH + "/transparent.aif").out()
>>> trig = TrigRand(tabr['trig'])

See also

Osc

>>> s = Server().boot()
>>> s.start()
>>> snd = SndTable(SNDS_PATH + '/transparent.aif')
>>> freq = snd.getRate()
>>> a = TableRead(table=snd, freq=[freq,freq*.99], loop=True, mul=.3).out()

Public Data Attributes:

table

PyoTableObject.

freq

float or PyoObject.

loop

int.

interp

int {1, 2, 3, 4}.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table[, freq, loop, interp, mul, add])

setTable(x)

Replace the table attribute.

setFreq(x)

Replace the freq attribute.

setLoop(x)

Replace the loop attribute.

setInterp(x)

Replace the interp attribute.

setKeepLast(x)

If anything but zero, the object will hold the last value when stopped.

reset()

Resets current phase to 0.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table[, freq, loop, interp, 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__(table[, freq, loop, interp, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setFreq(x)[source]

Replace the freq attribute.

Args
x: float or PyoObject

new freq attribute.

setLoop(x)[source]

Replace the loop attribute.

Args
x: int {0, 1}

new loop attribute.

setInterp(x)[source]

Replace the interp attribute.

Args
x: int {1, 2, 3, 4}

new interp attribute.

setKeepLast(x)[source]

If anything but zero, the object will hold the last value when stopped.

Args
x: bool

If 0, the object will be reset to 0 when stopped, otherwise it will hold its last value.

reset()[source]

Resets current phase to 0.

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 table

PyoTableObject. Table containing the waveform samples.

property freq

float or PyoObject. Frequency in cycles per second.

property loop

int. Looping mode.

property interp

int {1, 2, 3, 4}. Interpolation method.

TableRec

class TableRec(input, table, fadetime=0)[source]

TableRec is for writing samples into a previously created NewTable.

See NewTable to create an empty table.

The play method is not called at the object creation time. It starts the recording into the table until the table is full. Calling the play method again restarts the recording and overwrites previously recorded samples. The stop method stops the recording. Otherwise, the default behaviour is to record through the end of the table.

Parent

PyoObject

Args
input: PyoObject

Audio signal to write in the table.

table: NewTable

The table where to write samples.

fadetime: float, optional

Fade time at the beginning and the end of the recording in seconds. Defaults to 0.

Note

The out() method is bypassed. TableRec returns no signal.

TableRec has no mul and add attributes.

TableRec will send a trigger signal at the end of the recording. User can retrieve the trigger streams by calling obj[‘trig’]. In this example, the recorded table will be read automatically after a recording:

>>> a = Input(0)
>>> t = NewTable(length=1, chnls=1)
>>> rec = TableRec(a, table=t, fadetime=0.01)
>>> tr = TrigEnv(rec['trig'], table=t, dur=1).out()

obj[‘time’] outputs an audio stream of the current recording time, in samples.

>>> s = Server(duplex=1).boot()
>>> s.start()
>>> t = NewTable(length=2, chnls=1)
>>> a = Input(0)
>>> b = TableRec(a, t, .01)
>>> amp = Iter(b["trig"], [.5])
>>> freq = t.getRate()
>>> c = Osc(t, [freq, freq*.99], mul=amp).out()
>>> # to record in the empty table, call:
>>> # b.play()

Public Data Attributes:

input

PyoObject.

table

NewTable.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(input, table[, fadetime])

__getitem__(i)

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

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

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setInput(x[, fadetime])

Replace the input attribute.

setTable(x)

Replace the table attribute.

Inherited from PyoObject

__init__(input, table[, fadetime])

__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__(input, table[, fadetime])

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.

setMul(x)[source]

Replace the mul attribute.

Args
x: float or PyoObject

New mul attribute.

setAdd(x)[source]

Replace the add attribute.

Args
x: float or PyoObject

New add attribute.

setInput(x, fadetime=0.05)[source]

Replace the input attribute.

Args
x: PyoObject

New signal to process.

fadetime: float, optional

Crossfade time between old and new input. Defaults to 0.05.

setTable(x)[source]

Replace the table attribute.

Args
x: NewTable

new table attribute.

property input

PyoObject. Audio signal to write in the table.

property table

NewTable. The table where to write samples.

TableWrite

class TableWrite(input, pos, table, mode=0, maxwindow=1024)[source]

TableWrite writes samples into a previously created NewTable.

See NewTable to create an empty table.

TableWrite takes samples from its input stream and writes them at a normalized or raw position given by the pos stream. Position must be an audio stream, ie. a PyoObject. This object allows fast recording of values coming from an X-Y pad into a table object.

Parent

PyoObject

Args
input: PyoObject

Audio signal to write in the table.

pos: PyoObject

Audio signal specifying the position where to write the input samples. It is a normalized position (in the range 0 to 1) in mode=0 or the raw position (in samples) for any other value of mode.

table: NewTable

The table where to write samples.

mode: int, optional

Sets the writing pointer mode. If 0, the position must be normalized between 0 (beginning of the table) and 1 (end of the table). For any other value, the position must be in samples between 0 and the length of the table. Available at initialization time only.

maxwindow: int optional

Maximum length, in samples, of the interpolated window when the position is moving fast. Useful to avoid interpolation over the entire table if using a circular writing position. Available at initialization time only. Defaults to 1024.

Note

The out() method is bypassed. TableWrite returns no signal.

TableWrite has no mul and add attributes.

See also

NewTable, TableRec

>>> s = Server(duplex=1).boot()
>>> s.start()
>>> tab = NewTable(8192/s.getSamplingRate())
>>> tab.view()
>>> pos = Phasor(.5)
>>> val = Sine(.25)
>>> rec = TableWrite(val, pos, tab)
>>> pat = Pattern(tab.refreshView, 0.05).play()

Public Data Attributes:

input

PyoObject.

table

NewTable.

pos

PyoObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(input, pos, table[, mode, maxwindow])

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

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

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setInput(x[, fadetime])

Replace the input attribute.

setTable(x)

Replace the table attribute.

setPos(x)

Replace the pos attribute.

Inherited from PyoObject

__init__(input, pos, table[, mode, maxwindow])

__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__(input, pos, table[, mode, maxwindow])

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.

setMul(x)[source]

Replace the mul attribute.

Args
x: float or PyoObject

New mul attribute.

setAdd(x)[source]

Replace the add attribute.

Args
x: float or PyoObject

New add attribute.

setInput(x, fadetime=0.05)[source]

Replace the input attribute.

Args
x: PyoObject

New signal to process.

fadetime: float, optional

Crossfade time between old and new input. Defaults to 0.05.

setTable(x)[source]

Replace the table attribute.

Args
x: NewTable

new table attribute.

setPos(x)[source]

Replace the pos attribute.

Args
x: PyoObject

new pos attribute.

property input

PyoObject. Audio signal to write in the table.

property table

NewTable. The table where to write samples.

property pos

PyoObject. Normalized position, as audio stream, where to write samples.

TableScale

class TableScale(table, outtable, mul=1, add=0)[source]

Scales all the values contained in a PyoTableObject.

TableScale scales the values of table argument according to mul and add arguments and writes the new values in outtable.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the original values.

outtable: PyoTableObject

Table where to write the scaled values.

>>> s = Server().boot()
>>> s.start()
>>> t = DataTable(size=12, init=midiToHz(range(48, 72, 2)))
>>> t2 = DataTable(size=12)
>>> m = Metro(.2).play()
>>> c = Counter(m ,min=0, max=12)
>>> f1 = TableIndex(t, c)
>>> syn1 = SineLoop(f1, feedback=0.08, mul=0.3).out()
>>> scl = TableScale(t, t2, mul=1.5)
>>> f2 = TableIndex(t2, c)
>>> syn2 = SineLoop(f2, feedback=0.08, mul=0.3).out(1)

Public Data Attributes:

table

PyoTableObject.

outtable

PyoTableObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table, outtable[, mul, add])

setTable(x)

Replace the table attribute.

setOuttable(x)

Replace the outtable attribute.

ctrl([map_list, title, wxnoserver])

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

Inherited from PyoObject

__init__(table, outtable[, 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__(table, outtable[, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

setOuttable(x)[source]

Replace the outtable attribute.

Args
x: PyoTableObject

new outtable 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 table

PyoTableObject. Table containing the original values.

property outtable

PyoTableObject. Scaled output table.

TableFill

class TableFill(input, table)[source]

Continuously fills a table with incoming samples.

See DataTable or NewTable to create an empty table.

TableFill takes an audio input and writes values into a PyoTableObject, samples by samples. It wraps around the table length when reaching the end of the table.

Calling the play method reset the writing position to 0.

Parent

PyoObject

Args
input: PyoObject

Audio signal to write in the table.

table: PyoTableObject

The table where to write values.

Note

The out() method is bypassed. TableFill returns no signal.

TableFill has no mul and add attributes.

>>> s = Server().boot()
>>> s.start()
>>> table = DataTable(s.getBufferSize(), chnls=2)
>>> sig = Sine([400,500], mul=0.3)
>>> fill = TableFill(sig, table)
>>> read = TableRead(table, table.getRate(), loop=True).out()

Public Data Attributes:

input

PyoObject.

table

PyoTableObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(input, table)

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

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

setMul(x)

Replace the mul attribute.

setAdd(x)

Replace the add attribute.

setInput(x[, fadetime])

Replace the input attribute.

setTable(x)

Replace the table attribute.

getCurrentPos([all])

Returns the current pointer position, in samples, in the table.

Inherited from PyoObject

__init__(input, table)

__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__(input, table)

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.

setMul(x)[source]

Replace the mul attribute.

Args
x: float or PyoObject

New mul attribute.

setAdd(x)[source]

Replace the add attribute.

Args
x: float or PyoObject

New add attribute.

setInput(x, fadetime=0.05)[source]

Replace the input attribute.

Args
x: PyoObject

New signal to process.

fadetime: float, optional

Crossfade time between old and new input. Defaults to 0.05.

setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

getCurrentPos(all=False)[source]

Returns the current pointer position, in samples, in the table.

Args
all: boolean, optional

If True, returns the current position of all internal objects as a list.

If False, only the current position of the first object’s stream will be returned as a float.

property input

PyoObject. Audio signal to write in the table.

property table

PyoTableObject. The table where to write values.

TableScan

class TableScan(table, mul=1, add=0)[source]

Reads the content of a table in loop, without interpolation.

A simple table reader, sample by sample, with wrap-around when reaching the end of the table.

Parent

PyoObject

Args
table: PyoTableObject

Table containing the waveform samples.

See also

Osc, TableRead

>>> s = Server().boot()
>>> s.start()
>>> tab = DataTable(s.getBufferSize(), 2)
>>> sig = Sine([500, 600], mul=0.3)
>>> fill = TableFill(sig, tab)
>>> scan = TableScan(tab).out()

Public Data Attributes:

table

PyoTableObject.

Inherited from PyoObject

mul

float or PyoObject.

add

float or PyoObject.

Public Methods:

__init__(table[, mul, add])

setTable(x)

Replace the table attribute.

reset()

Resets current phase to 0.

Inherited from PyoObject

__init__(table[, 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__(table[, mul, add])

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])


setTable(x)[source]

Replace the table attribute.

Args
x: PyoTableObject

new table attribute.

reset()[source]

Resets current phase to 0.

property table

PyoTableObject. Table containing the waveform samples.