SfMarkerLooper

SfMarkerLooper(path, speed=1, mark=0, interp=2, mul=1, add=0)

AIFF with markers soundfile looper.

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 loops a specific marker (set in the header of the file) until it received a new integer in the `mark` parameter.

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.
    mark : float or PyoObject, optional
        Integer denoting the marker to loop, in the range 0 -> len(getMarkers()).
        Defaults to 0.
    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.
    setMark(x) : Replace the `mark` attribute.
    getMarkers() : Returns a list of marker time values in samples.

Attributes:

    speed : float or PyoObject, Transposition factor.
    mark : float or PyoObject, Marker to loop.
    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()
    >>> a = SfMarkerLooper(SNDS_PATH + '/transparent.aif').out()
    >>> rnd = RandInt(len(a.getMarkers()), 2)
    >>> a.mark = rnd

Methods details:

    SfMarkerLooper.setSpeed(x):

        Replace the `speed` attribute.

        Parameters:

        x : float or PyoObject
            new `speed` attribute.

    SfMarkerLooper.setInterp(x):

        Replace the `interp` attribute.

        Parameters:

        x : int {1, 2, 3, 4}
            new `interp` attribute.

    SfMarkerLooper.setMark(x):

        Replace the `mark` attribute.

        Parameters:

        x : float or PyoObject
            new `mark` attribute.

    SfMarkerLooper.getMarkers(self):

        Returns a list of marker time values in samples.