PyoObject(self)
Base class for all pyo objects that manipulate vectors of samples.
The user should never instantiate an object of this class.
Methods:
play() : Start processing without sending samples to output.
This method is called automatically at the object creation.
stop() : Stop processing.
out(chnl, inc) : Start processing and send samples to audio output
beginning at `chnl`.
mix(voices) : Mix object's audio streams into `voices` streams and
return the Mix object.
setMul(x) : Replace the `mul` attribute.
setAdd(x) : Replace the `add` attribute.
setDiv(x) : Replace and inverse the `mul` attribute.
setSub(x) : Replace and inverse the `add` attribute.
set(attr, value, port) : Replace any attribute with portamento.
ctrl(map_list, title) : Opens a sliders window to control parameters.
get(all) : Return the first sample of the current buffer as a float.
dump() : Print current status of the object's attributes.
Attributes:
mul : float or PyoObject
Multiplication factor.
add : float or PyoObject
Addition factor.
Notes:
- Other operations:
len(obj) : Return the number of audio streams in an object.
obj[x] : Return stream `x` of the object. `x` is a number
from 0 to len(obj) - 1.
del obj : Perform a clean delete of the object.
- Arithmetics:
Multiplication, addition, division and substraction can be applied
between pyo objects or between pyo objects and numbers. Doing so
returns a Dummy object with the result of the operation.
`b = a * 0.5` creates a Dummy object `b` with `mul` attribute set
to 0.5 and leave `a` unchanged.
Inplace multiplication, addition, division and substraction can be
applied between pyo objects or between pyo objects and numbers.
These operations will replace the `mul` or `add` factor of the object.
`a *= 0.5` replaces the `mul` attribute of `a`.
Methods details:
PyoObject.play(dur=0, delay=0):
Start processing without sending samples to output.
This method is called automatically at the object creation.
Parameters:
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.
PyoObject.stop(self):
Stop processing.
PyoObject.out(chnl=0, inc=1, dur=0, delay=0):
Start processing and send samples to audio output beginning at `chnl`.
Parameters:
chnl : int, optional
Physical output assigned to the first audio stream of the object.
Defaults to 0.
If `chnl` is an integer equal or greater than 0, successive
streams increment the output number by `inc` and wrap around
the global number of channels.
If `chnl` is a negative integer: 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.
inc : int, optional
Output increment value.
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.
PyoObject.mix(voices=1):
Mix the object's audio streams into `voices` streams and return
the Mix object.
Parameters:
voices : int, optional
Number of audio streams of the Mix object created by this method.
If more than 1, object's streams are alternated and added into
Mix object's streams. Defaults to 1.
PyoObject.setMul(x):
Replace the `mul` attribute.
Parameters:
x : float or PyoObject
New `mul` attribute.
PyoObject.setAdd(x):
Replace the `add` attribute.
Parameters:
x : float or PyoObject
New `add` attribute.
PyoObject.setDiv(x):
Replace and inverse the `add` attribute.
Parameters:
x : float or PyoObject
New inversed `add` attribute.
PyoObject.setSub(x):
Replace and inverse the `mul` attribute.
Parameters:
x : float or PyoObject
New inversed `mul` attribute.
PyoObject.set(attr, value, port=0.03):
Replace any attribute with portamento.
This method is intended to be applied on attributes that are not
already assigned to PyoObjects. It will work only with floats or
list of floats.
Parameters:
attr : string
Name of the attribute as a string.
value : float
New value.
port : float, optional
Time, in seconds, to reach the new value
PyoObject.ctrl(map_list=None, title=None, wxnoserver=False):
Opens a sliders window to control the parameters of the object.
Only parameters that can be set to a PyoObject are allowed
to be mapped on a slider.
If a list of values are given to a parameter, a multisliders
will be used to control each stream independently.
Parameters:
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 and not
to wait for it before showing the controller window.
Defaults to False.
PyoObject.get(all=False):
Return the first sample of the current buffer as a float.
Can be used to convert audio stream to usable Python data.
Object that implements string identifier for specific audio
streams must use the corresponding string to specify which stream
to get value. See get() method definition in these object's man pages.
Parameters:
all : boolean, optional
If True, the first value of each object's stream
will be returned as a list. Otherwise, only the value
of the first object's stream will be returned as a float.
Defaults to False.
PyoObject.dump(self):
Print the number of streams and the current status of the
object's attributes.
Subsections
- analysis : Tools to analyze audio signals.
- arithmetic : Tools to perform arithmetic operations on audio signals.
- Abs : Performs a absolute function on audio signal.
- Cos : Performs a cosine function on audio signal.
- Log : Performs a natural log function on audio signal.
- Log10 : Performs a base 10 log function on audio signal.
- Log2 : Performs a base 2 log function on audio signal.
- Pow : Performs a power function on audio signal.
- Sin : Performs a sine function on audio signal.
- Sqrt : Performs a square-root function on audio signal.
- Tan : Performs a tangent function on audio signal.
- controls : Objects designed to create parameter's control at audio rate.
- Adsr : Attack - Decay - Sustain - Release envelope generator.
- Expseg : Trace a series of exponential segments between specified break-points.
- Fader : Fadein - fadeout envelope generator.
- Linseg : Trace a series of line segments between specified break-points.
- Sig : Convert numeric value to PyoObject signal.
- SigTo : Convert numeric value to PyoObject signal with portamento.
- dynamics : Objects to modify the dynamic range and sample quality of audio streams.
- Clip : Clips a signal to a predefined limit.
- Compress : Reduces the dynamic range of an audio signal.
- Degrade : Signal quality reducer.
- effects : Objects to perform specific audio signal processing effects.
- Chorus : 8 modulated delay lines chorus processor.
- Convolve : Implements filtering using circular convolution.
- Delay : Sweepable recursive delay.
- Disto : Arc tangent distortion.
- Freeverb : Implementation of Jezar's Freeverb.
- Harmonizer : Generates harmonizing voices in synchrony with its input.
- SDelay : Simple delay without interpolation.
- WGVerb : 8 delay line mono FDN reverb.
- Waveguide : Basic waveguide model.
- filters : Different kinds of audio filtering operations.
- Allpass : Delay line based allpass filter.
- Allpass2 : Second-order phase shifter allpass.
- BandSplit : Splits an input signal into multiple frequency bands.
- Biquad : A sweepable general purpose biquadratic digital filter.
- Biquadx : A multi-stages sweepable general purpose biquadratic digital filter.
- DCBlock : Implements the DC blocking filter.
- EQ : Equalizer filter.
- Hilbert : Hilbert transform.
- Phaser : Multi-stages second-order phase shifter allpass filters.
- Port : Exponential portamento.
- Tone : A first-order recursive low-pass filter with variable frequency response.
- generators : Synthesis generators.
- FM : A simple frequency modulation generator.
- Input : Read from a numbered channel in an external audio signal.
- Noise : A white noise generator.
- Phasor : A simple phase incrementor.
- Sine : A simple sine wave oscillator.
- SineLoop : A simple sine wave oscillator with feedback.
- internal objects :
- Dummy : Dummy object used to perform arithmetics on PyoObject.
- InputFader : Audio streams crossfader.
- Mix : Mix audio streams to arbitrary number of streams.
- VarPort : Convert numeric value to PyoObject signal with portamento.
- matrixprocess : PyoObjects to perform operations on PyoMatrixObjects.
- MatrixMorph : Morphs between multiple PyoMatrixObjects.
- MatrixPointer : Matrix reader with control on the 2D pointer position.
- MatrixRec : MatrixRec is for writing samples into a previously created NewMatrix.
- midi : Objects to retrieve Midi informations for a specific Midi port.
- Midictl : Get the current value of a Midi channel controller.
- Notein : Generates Midi note messages.
- opensoundcontrol : Objects to manage values on an Open Sound Control port.
- OscReceive : Receives values over a network via the Open Sound Control protocol.
- OscSend : Sends values over a network via the Open Sound Control protocol.
- pan : Objects to place the sound on an arbitrary set of speakers.
- Pan : Cosinus panner with control on the spread factor.
- SPan : Simple equal power panner.
- Selector : Audio selector.
- Switch : Audio switcher.
- patterns :
- CallAfter : Calls a Python function after a given time.
- Pattern : Periodically calls a Python function.
- Score : Calls functions by incrementation of a preformatted name.
- players : Play soundfiles from the disk.
- randoms : Random noise generators.
- Choice : Periodically choose a new value from a user list.
- RandInt : Periodic pseudo-random integer generator.
- Randh : Periodic pseudo-random generator.
- Randi : Periodic pseudo-random generator with interpolation.
- Xnoise : X-class pseudo-random generator.
- XnoiseMidi : X-class midi notes pseudo-random generator.
- tableprocess : PyoObjects to perform operations on PyoTableObjects.
- Granulator : Granular synthesis generator.
- Lookup : Uses table to do waveshaping on an audio signal.
- Looper : Crossfading looper.
- Osc : A simple oscillator reading a waveform table.
- Pointer : Table reader with control on the pointer position.
- Pulsar : Pulsar synthesis oscillator.
- TableIndex : Table reader by sample position without interpolation.
- TableMorph : Morphs between multiple PyoTableObjects.
- TableRead : Simple waveform table reader.
- TableRec : TableRec is for writing samples into a previously created NewTable.
- triggers : Objects to manage triggers streams.
- Beat : Generates algorithmic trigger patterns.
- Change : Sends trigger that informs when input value has changed.
- Cloud : Generates random triggers.
- Counter : Integer count generator.
- Metro : Generates isochronous trigger signals.
- Percent : Lets pass a certain percentage of the input triggers.
- Select : Sends trigger on matching integer values.
- Seq : Generates a rhythmic sequence of trigger signals.
- Thresh : Informs when a signal crosses a threshold.
- Trig : Sends one trigger.
- TrigChoice : Random generator from user's defined values.
- TrigEnv : Envelope reader generator.
- TrigExpseg : Exponential segments trigger.
- TrigFunc : Python function callback.
- TrigLinseg : Line segments trigger.
- TrigRand : Pseudo-random number generator.
- TrigRandInt : Pseudo-random integer generator.
- TrigXnoise : Triggered X-class pseudo-random generator.
- TrigXnoiseMidi : Triggered X-class midi notes pseudo-random generator.
- utils : Miscellaneous objects.
- Clean_objects : Stops and deletes PyoObjects after a given time.
- Compare : Comparison object.
- Interp : Interpolates between two signals.
- Print : Print PyoObject's current value.
- Record : Writes input sound in an audio file on the disk.
- SampHold : Performs a sample-and-hold operation on its input.
- Snap : Snap input values on a user's defined midi scale.