SfMarkerShuffler(path, speed=1, interp=2, mul=1, add=0)
AIFF with markers soundfile shuffler.
Reads audio data from a AIFF file, and can alter its pitch using one of several available interpolation types, as well as convert the sample rate to match the Server sampling rate setting. The reading pointer choose randomly a marker (set in the header of the file) as its starting point and reads the samples until it reaches the following marker. Then, it choose another marker and so on...
Parent class : PyoObject
Parameters:
path : string Full path name of the sound to read. speed : float or PyoObject, optional Transpose the pitch of input sound by this factor. 1 is the original pitch, lower values play sound slower, and higher values play sound faster. Negative values results in playing sound backward. At audio rate, fast changes between positive and negative values can result in strong DC components in the output sound. Defaults to 1. interp : int, optional Choice of the interpolation method. Defaults to 2. 1 : no interpolation 2 : linear 3 : cosinus 4 : cubic
Methods:
setSpeed(x) : Replace the `speed` attribute. setInterp(x) : Replace the `interp` attribute. getMarkers() : Returns a list of marker time values in samples.
Attributes:
speed : float or PyoObject, Transposition factor. interp : int {1, 2, 3, 4}, Interpolation method.
Notes:
Reading backward with fast changes at audio rate can generates strong DC in the resulting sound.
Examples:
>>> s = Server().boot() >>> s.start() >>> sf = SfMarkerShuffler(SNDS_PATH + "/transparent.aif", speed=1).out()
Methods details:
SfMarkerShuffler.setSpeed(x): Replace the `speed` attribute. Parameters: x : float or PyoObject new `speed` attribute. SfMarkerShuffler.setInterp(x): Replace the `interp` attribute. Parameters: x : int {1, 2, 3, 4} new `interp` attribute. SfMarkerShuffler.getMarkers(self): Returns a list of marker time values in samples.