Phase Vocoder¶
The phase vocoder is a digital signal processing technique of potentially great musical significance. It can be used to perform very high fidelity time scaling, pitch transposition, and myriad other modifications of sounds.
Objects in this category¶
PVAnal
: Phase Vocoder analysis object.PVSynth
: Phase Vocoder synthesis object.PVAddSynth
: Phase Vocoder additive synthesis object.PVTranspose
: Transpose the frequency components of a pv stream.PVVerb
: Spectral domain reverberation.PVGate
: Spectral gate.PVCross
: Performs cross-synthesis between two phase vocoder streaming object.PVMult
: Multiply magnitudes from two phase vocoder streaming object.PVMorph
: Performs spectral morphing between two phase vocoder streaming object.PVFilter
: Spectral filter.PVDelay
: Spectral delays.PVBuffer
: Phase vocoder buffer and playback with transposition.PVShift
: Spectral domain frequency shifter.PVAmpMod
: Performs frequency independent amplitude modulations.PVFreqMod
: Performs frequency independent frequency modulations.PVBufLoops
: Phase vocoder buffer with bin independent speed playback.PVBufTabLoops
: Phase vocoder buffer with bin independent speed playback.PVMix
: Mix the most prominent components from two phase vocoder streaming objects.
PVAnal¶
- class PVAnal(input, size=1024, overlaps=4, wintype=2, callback=None)[source]¶
Phase Vocoder analysis object.
PVAnal takes an input sound and performs the phase vocoder analysis on it. This results in two streams, one for the bin’s magnitudes and the other for the bin’s true frequencies. These two streams are used by the PVxxx object family to transform the input signal using spectral domain algorithms. The last object in the phase vocoder chain must be a PVSynth to perform the spectral to time domain conversion.
- Parent
- Args
- input: PyoObject
Input signal to process.
- size: int {pow-of-two > 4}, optional
FFT size. Must be a power of two greater than 4. Defaults to 1024.
The FFT size is the number of samples used in each analysis frame.
- overlaps: int, optional
The number of overlaped analysis block. Must be a power of two. Defaults to 4.
More overlaps can greatly improved sound quality synthesis but it is also more CPU expensive.
- wintype: int, optional
Shape of the envelope used to filter each input frame. Possible shapes are:
rectangular (no windowing)
Hamming
Hanning (default)
Bartlett (triangular)
Blackman 3-term
Blackman-Harris 4-term
Blackman-Harris 7-term
Tuckey (alpha = 0.66)
Sine (half-sine window)
- callback: callable, optional
If not None (default), this function will be called with the result of the analysis at the end of every overlap. The function will receive two arguments, a list of floats for both the magnitudes and the frequencies. The signature is:
callback(magnitudes, frequencies)
If you analyse a multi-channel signal, you should pass a list of callables, one per channel to analyse.
Public Methods:
__init__
(input[, size, overlaps, wintype, ...])setInput
(x[, fadetime])Replace the input attribute.
setSize
(x)Replace the size attribute.
setOverlaps
(x)Replace the overlaps attribute.
setWinType
(x)Replace the wintype attribute.
setCallback
(x)Replace the callback attribute.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- 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. Default to 0.05.
- property input¶
PyoObject. Input signal to process.
- property size¶
int. FFT size.
- property overlaps¶
int. FFT overlap factor.
- property wintype¶
int. Windowing method.
PVSynth¶
- class PVSynth(input, wintype=2, mul=1, add=0)[source]¶
Phase Vocoder synthesis object.
PVSynth takes a PyoPVObject as its input and performed the spectral to time domain conversion on it. This step converts phase vocoder magnitude and true frequency’s streams back to a real signal.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- wintype: int, optional
Shape of the envelope used to filter each input frame. Possible shapes are:
rectangular (no windowing)
Hamming
Hanning (default)
Bartlett (triangular)
Blackman 3-term
Blackman-Harris 4-term
Blackman-Harris 7-term
Tuckey (alpha = 0.66)
Sine (half-sine window)
Public Data Attributes:
PyoPVObject.
int.
Inherited from
PyoObject
mul
float or PyoObject.
add
float or PyoObject.
Public Methods:
__init__
(input[, wintype, mul, add])setInput
(x)Replace the input attribute.
setWinType
(x)Replace the wintype attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObject
__init__
([mul, add])__add__
(x)__radd__
(x)__iadd__
(x)__sub__
(x)__rsub__
(x)__isub__
(x)__mul__
(x)__rmul__
(x)__imul__
(x)__truediv__
(x)__rtruediv__
(x)__itruediv__
(x)__div__
(x)__rdiv__
(x)__idiv__
(x)__pow__
(x)__rpow__
(x)__mod__
(x)__neg__
()__lt__
(x)Return self<value.
__le__
(x)Return self<=value.
__eq__
(x)Return self==value.
__ne__
(x)Return self!=value.
__gt__
(x)Return self>value.
__ge__
(x)Return self>=value.
__do_comp__
(comp, mode[, default])isPlaying
([all])Returns True if the object is currently playing, otherwise, returns False.
isOutputting
([all])Returns True if the object is outputting.
get
([all])Return the first sample of the current buffer as a float.
play
([dur, delay])Start processing without sending samples to output.
out
([chnl, inc, dur, delay])Start processing and send samples to audio output beginning at chnl.
stop
([wait])Stop processing.
mix
([voices])Mix the object's audio streams into voices streams and return a Mix object.
range
(min, max)Adjust mul and add attributes according to a given range.
setMul
(x)Replace the mul attribute.
setAdd
(x)Replace the add attribute.
setSub
(x)Replace and inverse the add attribute.
setDiv
(x)Replace and inverse the mul attribute.
set
(attr, value[, port, callback])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- 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 input¶
PyoPVObject. Input signal to process.
- property wintype¶
int. Windowing method.
PVAddSynth¶
- class PVAddSynth(input, pitch=1, num=100, first=0, inc=1, mul=1, add=0)[source]¶
Phase Vocoder additive synthesis object.
PVAddSynth takes a PyoPVObject as its input and resynthesize the real signal using the magnitude and true frequency’s streams to control amplitude and frequency envelopes of an oscillator bank.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- pitch: float or PyoObject, optional
Transposition factor. Defaults to 1.
- num: int, optional
Number of oscillators used to synthesize the output sound. Defaults to 100.
- first: int, optional
The first bin to synthesize, starting from 0. Defaults to 0.
- inc: int, optional
Starting from bin first, resynthesize bins inc apart. Defaults to 1.
Public Data Attributes:
PyoPVObject.
float or PyoObject.
int.
int.
int.
Inherited from
PyoObject
mul
float or PyoObject.
add
float or PyoObject.
Public Methods:
__init__
(input[, pitch, num, first, inc, ...])setInput
(x)Replace the input attribute.
setPitch
(x)Replace the pitch attribute.
setNum
(x)Replace the num attribute.
setFirst
(x)Replace the first attribute.
setInc
(x)Replace the inc attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObject
__init__
([mul, add])__add__
(x)__radd__
(x)__iadd__
(x)__sub__
(x)__rsub__
(x)__isub__
(x)__mul__
(x)__rmul__
(x)__imul__
(x)__truediv__
(x)__rtruediv__
(x)__itruediv__
(x)__div__
(x)__rdiv__
(x)__idiv__
(x)__pow__
(x)__rpow__
(x)__mod__
(x)__neg__
()__lt__
(x)Return self<value.
__le__
(x)Return self<=value.
__eq__
(x)Return self==value.
__ne__
(x)Return self!=value.
__gt__
(x)Return self>value.
__ge__
(x)Return self>=value.
__do_comp__
(comp, mode[, default])isPlaying
([all])Returns True if the object is currently playing, otherwise, returns False.
isOutputting
([all])Returns True if the object is outputting.
get
([all])Return the first sample of the current buffer as a float.
play
([dur, delay])Start processing without sending samples to output.
out
([chnl, inc, dur, delay])Start processing and send samples to audio output beginning at chnl.
stop
([wait])Stop processing.
mix
([voices])Mix the object's audio streams into voices streams and return a Mix object.
range
(min, max)Adjust mul and add attributes according to a given range.
setMul
(x)Replace the mul attribute.
setAdd
(x)Replace the add attribute.
setSub
(x)Replace and inverse the add attribute.
setDiv
(x)Replace and inverse the mul attribute.
set
(attr, value[, port, callback])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- 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 input¶
PyoPVObject. Input signal to process.
- property pitch¶
float or PyoObject. Transposition factor.
- property num¶
int. Number of oscillators.
- property first¶
int. First bin to synthesize.
- property inc¶
int. Synthesized bin increment.
PVTranspose¶
- class PVTranspose(input, transpo=1)[source]¶
Transpose the frequency components of a pv stream.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- transpo: float or PyoObject, optional
Transposition factor. Defaults to 1.
Public Methods:
__init__
(input[, transpo])setInput
(x)Replace the input attribute.
setTranspo
(x)Replace the transpo attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property transpo¶
float or PyoObject. Transposition factor.
PVVerb¶
- class PVVerb(input, revtime=0.75, damp=0.75)[source]¶
Spectral domain reverberation.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- revtime: float or PyoObject, optional
Reverberation factor, between 0 and 1. Defaults to 0.75.
- damp: float or PyoObject, optional
High frequency damping factor, between 0 and 1. 1 means no damping and 0 is the most damping. Defaults to 0.75.
>>> s = Server().boot() >>> s.start() >>> sf = SfPlayer(SNDS_PATH+"/transparent.aif", loop=True, mul=.5) >>> pva = PVAnal(sf, size=2048) >>> pvg = PVGate(pva, thresh=-36, damp=0) >>> pvv = PVVerb(pvg, revtime=0.95, damp=0.95) >>> pvs = PVSynth(pvv).mix(2).out() >>> dry = Delay(sf, delay=2048./s.getSamplingRate(), mul=.4).mix(2).out()
Public Methods:
__init__
(input[, revtime, damp])setInput
(x)Replace the input attribute.
setRevtime
(x)Replace the revtime attribute.
setDamp
(x)Replace the damp attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property revtime¶
float or PyoObject. Reverberation factor.
- property damp¶
float or PyoObject. High frequency damping factor.
PVGate¶
- class PVGate(input, thresh=-20, damp=0.0, inverse=False)[source]¶
Spectral gate.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- thresh: float or PyoObject, optional
Threshold factor in dB. Bins below that threshold will be scaled by damp factor. Defaults to -20.
- damp: float or PyoObject, optional
Damping factor for low amplitude bins. Defaults to 0.
- inverse: boolean, optional
If True, the damping factor will be applied to the bins with amplitude above the given threshold. If False, the damping factor is applied to bins with amplitude below the given threshold. Defaults to False.
Public Data Attributes:
PyoPVObject.
float or PyoObject.
float or PyoObject.
boolean.
Public Methods:
__init__
(input[, thresh, damp, inverse])setInput
(x)Replace the input attribute.
setThresh
(x)Replace the thresh attribute.
setDamp
(x)Replace the damp attribute.
setInverse
(x)Replace the inverse attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property thresh¶
float or PyoObject. Threshold factor.
- property damp¶
float or PyoObject. Damping factor for low amplitude bins.
- property inverse¶
boolean. If True, the gate is applied to high amplitude bins.
PVCross¶
- class PVCross(input, input2, fade=1)[source]¶
Performs cross-synthesis between two phase vocoder streaming object.
The amplitudes from input and input2 (scaled by fade argument) are applied to the frequencies of input.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process. Frequencies from this pv stream are used to compute the output signal.
- input2: PyoPVObject
Phase vocoder streaming object which gives the second set of magnitudes. Frequencies from this pv stream are not used.
- fade: float or PyoObject, optional
Scaling factor for the output amplitudes, between 0 and 1. 0 means amplitudes from input and 1 means amplitudes from input2. Defaults to 1.
Note
The two input pv stream must have the same size and overlaps. It is the responsibility of the user to be sure they are consistent. To change the size (or the overlaps) of the phase vocoder process, one must write a function to change both at the same time (see the example below). Another possibility is to use channel expansion to analyse both sounds with the same PVAnal object.
>>> s = Server().boot() >>> s.start() >>> sf = SineLoop(freq=[80,81], feedback=0.07, mul=.5) >>> sf2 = SfPlayer(SNDS_PATH+"/transparent.aif", loop=True, mul=.5) >>> pva = PVAnal(sf) >>> pva2 = PVAnal(sf2) >>> pvc = PVCross(pva, pva2, fade=1) >>> pvs = PVSynth(pvc).out() >>> def size(x): ... pva.size = x ... pva2.size = x >>> def olaps(x): ... pva.overlaps = x ... pva2.overlaps = x
Public Methods:
__init__
(input, input2[, fade])setInput
(x)Replace the input attribute.
setInput2
(x)Replace the input2 attribute.
setFade
(x)Replace the fade attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property input2¶
PyoPVObject. Second set of amplitudes.
- property fade¶
float or PyoObject. Scaling factor.
PVMult¶
- class PVMult(input, input2)[source]¶
Multiply magnitudes from two phase vocoder streaming object.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process. Frequencies from this pv stream are used to compute the output signal.
- input2: PyoPVObject
Phase vocoder streaming object which gives the second set of magnitudes. Frequencies from this pv stream are not used.
Note
The two input pv stream must have the same size and overlaps. It is the responsibility of the user to be sure they are consistent. To change the size (or the overlaps) of the phase vocoder process, one must write a function to change both at the same time (see the example below). Another possibility is to use channel expansion to analyse both sounds with the same PVAnal object.
>>> s = Server().boot() >>> s.start() >>> sf = FM(carrier=[100,150], ratio=[.999,.5005], index=20, mul=.4) >>> sf2 = SfPlayer(SNDS_PATH+"/transparent.aif", loop=True, mul=.5) >>> pva = PVAnal(sf) >>> pva2 = PVAnal(sf2) >>> pvc = PVMult(pva, pva2) >>> pvs = PVSynth(pvc).out() >>> def size(x): ... pva.size = x ... pva2.size = x >>> def olaps(x): ... pva.overlaps = x ... pva2.overlaps = x
Public Methods:
__init__
(input, input2)setInput
(x)Replace the input attribute.
setInput2
(x)Replace the input2 attribute.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- property input¶
PyoPVObject. Input signal to process.
- property input2¶
PyoPVObject. Second set of magnitudes.
PVMorph¶
- class PVMorph(input, input2, fade=0.5)[source]¶
Performs spectral morphing between two phase vocoder streaming object.
According to fade argument, the amplitudes from input and input2 are interpolated linearly while the frequencies are interpolated exponentially.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object which gives the first set of magnitudes and frequencies.
- input2: PyoPVObject
Phase vocoder streaming object which gives the second set of magnitudes and frequencies.
- fade: float or PyoObject, optional
Scaling factor for the output amplitudes and frequencies, between 0 and 1. 0 is input and 1 in input2. Defaults to 0.5.
Note
The two input pv stream must have the same size and overlaps. It is the responsibility of the user to be sure they are consistent. To change the size (or the overlaps) of the phase vocoder process, one must write a function to change both at the same time (see the example below). Another possibility is to use channel expansion to analyse both sounds with the same PVAnal object.
>>> s = Server().boot() >>> s.start() >>> sf = SineLoop(freq=[100,101], feedback=0.12, mul=.5) >>> sf2 = SfPlayer(SNDS_PATH+"/transparent.aif", loop=True, mul=.5) >>> pva = PVAnal(sf) >>> pva2 = PVAnal(sf2) >>> pvc = PVMorph(pva, pva2, fade=0.5) >>> pvs = PVSynth(pvc).out() >>> def size(x): ... pva.size = x ... pva2.size = x >>> def olaps(x): ... pva.overlaps = x ... pva2.overlaps = x
Public Methods:
__init__
(input, input2[, fade])setInput
(x)Replace the input attribute.
setInput2
(x)Replace the input2 attribute.
setFade
(x)Replace the fade attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. First input signal.
- property input2¶
PyoPVObject. Second input signal.
- property fade¶
float or PyoObject. Scaling factor.
PVFilter¶
- class PVFilter(input, table, gain=1, mode=0)[source]¶
Spectral filter.
PVFilter filters frequency components of a pv stream according to the shape drawn in the table given in argument.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- table: PyoTableObject
Table containing the filter shape. If the table length is smaller than fftsize/2, remaining bins will be set to 0.
- gain: float or PyoObject, optional
Gain of the filter applied to the input spectrum. Defaults to 1.
- mode: int, optional
Table scanning mode. Defaults to 0.
If 0, bin indexes outside table size are set to 0. If 1, bin indexes are scaled over table length.
Public Methods:
__init__
(input, table[, gain, mode])setInput
(x)Replace the input attribute.
setTable
(x)Replace the table attribute.
setGain
(x)Replace the gain attribute.
setMode
(x)Replace the mode attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property table¶
PyoTableObject. Table containing the filter shape.
- property gain¶
float or PyoObject. Gain of the filter.
- property mode¶
int. Table scanning mode.
PVDelay¶
- class PVDelay(input, deltable, feedtable, maxdelay=1.0, mode=0)[source]¶
Spectral delays.
PVDelay applies different delay times and feedbacks for each bin of a phase vocoder analysis. Delay times and feedbacks are specified with PyoTableObjects.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- deltable: PyoTableObject
Table containing delay times, as integer multipliers of the FFT hopsize (fftsize / overlaps).
If the table length is smaller than fftsize/2, remaining bins will be set to 0.
- feedtable: PyoTableObject
Table containing feedback values, between -1 and 1.
If the table length is smaller than fftsize/2, remaining bins will be set to 0.
- maxdelay: float, optional
Maximum delay time in seconds. Available at initialization time only. Defaults to 1.0.
- mode: int, optional
Tables scanning mode. Defaults to 0.
If 0, bin indexes outside table size are set to 0. If 1, bin indexes are scaled over table length.
>>> s = Server().boot() >>> s.start() >>> SIZE = 1024 >>> SIZE2 = int(SIZE / 2) >>> OLAPS = 4 >>> MAXDEL = 2.0 # two seconds delay memories >>> FRAMES = int(MAXDEL * s.getSamplingRate() / (SIZE / OLAPS)) >>> # Edit tables with the graph() method. yrange=(0, FRAMES) for delays table >>> dt = DataTable(size=SIZE2, init=[i / float(SIZE2) * FRAMES for i in range(SIZE2)]) >>> ft = DataTable(size=SIZE2, init=[0.5]*SIZE2) >>> src = SfPlayer(SNDS_PATH+"/transparent.aif", loop=True, mul=0.5) >>> pva = PVAnal(src, size=SIZE, overlaps=OLAPS) >>> pvd = PVDelay(pva, dt, ft, maxdelay=MAXDEL) >>> pvs = PVSynth(pvd).out()
Public Data Attributes:
PyoPVObject.
PyoTableObject.
PyoTableObject.
int.
Public Methods:
__init__
(input, deltable, feedtable[, ...])setInput
(x)Replace the input attribute.
setDeltable
(x)Replace the deltable attribute.
setFeedtable
(x)Replace the feedtable attribute.
setMode
(x)Replace the mode attribute.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- setDeltable(x)[source]¶
Replace the deltable attribute.
- Args
- x: PyoTableObject
new deltable attribute.
- setFeedtable(x)[source]¶
Replace the feedtable attribute.
- Args
- x: PyoTableObject
new feedtable attribute.
- property input¶
PyoPVObject. Input signal to process.
- property deltable¶
PyoTableObject. Table containing the delay times.
- property feedtable¶
PyoTableObject. Table containing feedback values.
- property mode¶
int. Table scanning mode.
PVBuffer¶
- class PVBuffer(input, index, pitch=1.0, length=1.0)[source]¶
Phase vocoder buffer and playback with transposition.
PVBuffer keeps length seconds of pv analysis in memory and gives control on playback position and transposition.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- index: PyoObject
Playback position, as audio stream, normalized between 0 and 1.
- pitch: float or PyoObject, optional
Transposition factor. Defaults to 1.
- length: float, optional
Memory length in seconds. Defaults to 1.0.
Note
The play() method can be called to start a new recording of the current pv input.
>>> s = Server().boot() >>> s.start() >>> f = SNDS_PATH+'/transparent.aif' >>> f_len = sndinfo(f)[1] >>> src = SfPlayer(f, mul=0.5) >>> index = Phasor(freq=1.0/f_len*0.25, phase=0.9) >>> pva = PVAnal(src, size=1024, overlaps=8) >>> pvb = PVBuffer(pva, index, pitch=1.25, length=f_len) >>> pvs = PVSynth(pvb).out()
Public Methods:
__init__
(input, index[, pitch, length])setInput
(x)Replace the input attribute.
setIndex
(x)Replace the index attribute.
setPitch
(x)Replace the pitch attribute.
setLength
(x)Replace the length attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property index¶
PyoObject. Reader’s normalized position.
- property pitch¶
float or PyoObject. Transposition factor.
- property length¶
float. Buffer length in seconds.
PVShift¶
- class PVShift(input, shift=0)[source]¶
Spectral domain frequency shifter.
PVShift linearly moves the analysis bins by the amount, in Hertz, specified by the the shift argument.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- shift: float or PyoObject, optional
Frequency shift factor. Defaults to 0.
Public Methods:
__init__
(input[, shift])setInput
(x)Replace the input attribute.
setShift
(x)Replace the shift attribute.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property shift¶
float or PyoObject. Frequency shift factor.
PVAmpMod¶
- class PVAmpMod(input, basefreq=1, spread=0, shape=0)[source]¶
Performs frequency independent amplitude modulations.
PVAmpMod modulates the magnitude of each bin of a pv stream with an independent oscillator. basefreq and spread are used to derive the frequency of each modulating oscillator.
Internally, the following operations are applied to derive oscillator frequencies (i is the bin number):
spread = spread * 0.001 + 1.0
f_i = basefreq * pow(spread, i)
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- basefreq: float or PyoObject, optional
Base modulation frequency, in Hertz. Defaults to 1.
- spread: float or PyoObject, optional
Spreading factor for oscillator frequencies, between -1 and 1. 0 means every oscillator has the same frequency.
- shape: int, optional
- Modulation oscillator waveform. Possible shapes are:
Sine (default)
Sawtooth
Ramp (inverse sawtooth)
Square
Triangle
Brown Noise
Pink Noise
White Noise
Public Data Attributes:
PyoPVObject.
float or PyoObject.
float or PyoObject.
int.
Public Methods:
__init__
(input[, basefreq, spread, shape])setInput
(x)Replace the input attribute.
setBasefreq
(x)Replace the basefreq attribute.
setSpread
(x)Replace the spread attribute.
setShape
(x)Replace the shape attribute.
reset
()Resets modulation pointers to 0.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- setBasefreq(x)[source]¶
Replace the basefreq attribute.
- Args
- x: float or PyoObject
new basefreq attribute.
- setShape(x)[source]¶
Replace the shape attribute.
- Args
- x: int
- new shape attribute. Possible shapes are:
Sine (default)
Sawtooth
Ramp (inverse sawtooth)
Square
Triangle
Brown Noise
Pink Noise
White Noise
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property basefreq¶
float or PyoObject. Modulator’s base frequency.
- property spread¶
float or PyoObject. Modulator’s frequency spreading factor.
- property shape¶
int. Modulation oscillator waveform.
PVFreqMod¶
- class PVFreqMod(input, basefreq=1, spread=0, depth=0.1, shape=0)[source]¶
Performs frequency independent frequency modulations.
PVFreqMod modulates the frequency of each bin of a pv stream with an independent oscillator. basefreq and spread are used to derive the frequency of each modulating oscillator.
Internally, the following operations are applied to derive oscillator frequencies (i is the bin number):
spread = spread * 0.001 + 1.0
f_i = basefreq * pow(spread, i)
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- basefreq: float or PyoObject, optional
Base modulation frequency, in Hertz. Defaults to 1.
- spread: float or PyoObject, optional
Spreading factor for oscillator frequencies, between -1 and 1. 0 means every oscillator has the same frequency.
- depth: float or PyoObject, optional
Amplitude of the modulating oscillators, between 0 and 1. Defaults to 0.1.
- shape: int, optional
- Modulation oscillator waveform. Possible shapes are:
Sine (default)
Sawtooth
Ramp (inverse sawtooth)
Square
Triangle
Brown Noise
Pink Noise
White Noise
Public Data Attributes:
PyoPVObject.
float or PyoObject.
float or PyoObject.
float or PyoObject.
int.
Public Methods:
__init__
(input[, basefreq, spread, depth, shape])setInput
(x)Replace the input attribute.
setBasefreq
(x)Replace the basefreq attribute.
setSpread
(x)Replace the spread attribute.
setDepth
(x)Replace the depth attribute.
setShape
(x)Replace the shape attribute.
reset
()Resets modulation pointers to 0.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- setBasefreq(x)[source]¶
Replace the basefreq attribute.
- Args
- x: float or PyoObject
new basefreq attribute.
- setShape(x)[source]¶
Replace the shape attribute.
- Args
- x: int
- new shape attribute. Possible shapes are:
Sine (default)
Sawtooth
Ramp (inverse sawtooth)
Square
Triangle
Brown Noise
Pink Noise
White Noise
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property basefreq¶
float or PyoObject. Modulator’s base frequency.
- property spread¶
float or PyoObject. Modulator’s frequencies spreading factor.
- property depth¶
float or PyoObject. Amplitude of the modulators.
- property shape¶
int. Modulation oscillator waveform.
PVBufLoops¶
- class PVBufLoops(input, low=1.0, high=1.0, mode=0, length=1.0)[source]¶
Phase vocoder buffer with bin independent speed playback.
PVBufLoops keeps length seconds of pv analysis in memory and gives control on playback position independently for every frequency bin.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- low: float or PyoObject, optional
Lowest bin speed factor. Defaults to 1.0.
- high: float or PyoObject, optional
Highest bin speed factor. Defaults to 1.0.
- mode: int, optional
- Speed distribution algorithm. Available algorithms are:
linear, line between low and high (default)
exponential, exponential line between low and high
logarithmic, logarithmic line between low and high
random, uniform random between low and high
rand expon min, exponential random from low to high
rand expon max, exponential random from high to low
rand bi-expon, bipolar exponential random between low and high
- length: float, optional
Memory length in seconds. Available at initialization time only. Defaults to 1.0.
Note
The play() method can be called to start a new recording of the current pv input.
Public Data Attributes:
PyoPVObject.
float or PyoObject.
float or PyoObject.
int.
Public Methods:
__init__
(input[, low, high, mode, length])setInput
(x)Replace the input attribute.
setLow
(x)Replace the low attribute.
setHigh
(x)Replace the high attribute.
setMode
(x)Replace the mode attribute.
reset
()Reset pointer positions to 0.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- ctrl(map_list=None, title=None, wxnoserver=False)[source]¶
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.
- 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 input¶
PyoPVObject. Input signal to process.
- property low¶
float or PyoObject. Lowest bin speed factor.
- property high¶
float or PyoObject. Highest bin speed factor.
- property mode¶
int. Speed distribution algorithm.
PVBufTabLoops¶
- class PVBufTabLoops(input, speed, length=1.0)[source]¶
Phase vocoder buffer with bin independent speed playback.
PVBufTabLoops keeps length seconds of pv analysis in memory and gives control on playback position, using a PyoTableObject, independently for every frequency bin.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object to process.
- speed: PyoTableObject
Table which specify the speed of bin playback readers.
- length: float, optional
Memory length in seconds. Available at initialization time only. Defaults to 1.0.
Note
The play() method can be called to start a new recording of the current pv input.
>>> s = Server().boot() >>> s.start() >>> f = SNDS_PATH+'/transparent.aif' >>> f_len = sndinfo(f)[1] >>> src = SfPlayer(f, mul=0.5) >>> spd = ExpTable([(0,1), (512,0.5)], exp=6, size=512) >>> pva = PVAnal(src, size=1024, overlaps=8) >>> pvb = PVBufTabLoops(pva, spd, length=f_len) >>> pvs = PVSynth(pvb).out()
Public Methods:
__init__
(input, speed[, length])setInput
(x)Replace the input attribute.
setSpeed
(x)Replace the speed attribute.
reset
()Reset pointer positions to 0.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- property input¶
PyoPVObject. Input signal to process.
- property speed¶
PyoTableObject. Table which specify the speed of bin playback readers.
PVMix¶
- class PVMix(input, input2)[source]¶
Mix the most prominent components from two phase vocoder streaming objects.
- Parent
- Args
- input: PyoPVObject
Phase vocoder streaming object 1.
- input2: PyoPVObject
Phase vocoder streaming object 2.
Note
The two input pv stream must have the same size and overlaps. It is the responsibility of the user to be sure they are consistent. To change the size (or the overlaps) of the phase vocoder process, one must write a function to change both at the same time (see the example below). Another possibility is to use channel expansion to analyse both sounds with the same PVAnal object.
>>> s = Server().boot() >>> s.start() >>> sf = SfPlayer(SNDS_PATH+"/transparent.aif", loop=True, mul=.5) >>> sf2 = SfPlayer(SNDS_PATH+"/accord.aif", loop=True, mul=.5) >>> pva = PVAnal(sf) >>> pva2 = PVAnal(sf2) >>> pvm = PVMix(pva, pva2) >>> pvs = PVSynth(pvm).out() >>> def size(x): ... pva.size = x ... pva2.size = x >>> def olaps(x): ... pva.overlaps = x ... pva2.overlaps = x
Public Methods:
__init__
(input, input2)setInput
(x)Replace the input attribute.
setInput2
(x)Replace the input2 attribute.
Inherited from
PyoPVObject
__init__
()isPlaying
([all])Returns True if the object is playing, otherwise, returns False.
play
([dur, delay])Start processing without sending samples to output.
stop
([wait])Stop processing.
set
(attr, value[, port])Replace any attribute with portamento.
ctrl
([map_list, title, wxnoserver])Opens a sliders window to control the parameters of the object.
Inherited from
PyoObjectBase
__init__
()dump
()Print infos about the current state of the object.
getBaseObjects
()Return a list of Stream objects managed by the instance.
getServer
()Return a reference to the current Server object.
getSamplingRate
()Return the current sampling rate (samples per second), as a float.
getBufferSize
()Return the current buffer size (samples per buffer), as an integer.
allowAutoStart
([switch])When autoStartChildren is activated in the Server, call this method with False as argument to stop the propagation of play/out/stop methods to and from this object.
useWaitTimeOnStop
()When autoStartChildren is activated in the Server, call this method to force an object given to the mul attribute of another object to use the wait time from the stop method instead of being stopped immediately.
addLinkedObject
(x)When autoStartChildren is activated in the Server, use this method to explicitly add an object in a dsp chain, which is generally controlled by the last object of the chain.
setStopDelay
(x)Set a specific waiting time when calling the stop method on this object.
getStopDelay
()Return the waiting time applied when calling the stop method on this object.
__iter__
()__next__
()next
()Alias for __next__ method.
__getitem__
(i)__setitem__
(i, x)__len__
()__repr__
()Return repr(self).
__dir__
()Default dir() implementation.
Private Data Attributes:
Inherited from
PyoPVObject
_STREAM_TYPE
Inherited from
PyoObjectBase
_STREAM_TYPE
Private Methods:
Inherited from
PyoPVObject
_init_play
()_reset_from_set
([attr])Inherited from
PyoObjectBase
_autoplay
([dur, delay])_autostop
([wait])
- property input¶
PyoPVObject. Phase vocoder streaming object 1.
- property input2¶
PyoPVObject. Phase vocoder streaming object 2.