Use the play~ object as a playback interface for a buffer~. that plays back samples based on an offset within the buffer. It is typically used with the line~ object, but can be used with any signal that generates a changing position value in milliseconds. The groove~ object provides another option for sample playback.
When the play~ object is created as mcs.play~ all of its signal signal outlets are combined into a single multichannel outlet. The behavior of mcs.play~ is otherwise identical to play~.
Specifies the number of output channels. The default number of channels is one. If the buffer~ being played has fewer channels than the number of play~ output channels, the extra channels output a zero signal. If the buffer~ has more channels, channels are mixed.
Sets the crossfade time for loop interpolation. If the value given is greater than the total loop duration, the total loop duration is used. The default crossfade duration is 50 milliseconds.
In loop mode, when playback reaches the end time (seemessage) it continues again from the start time. Loop mode is off by default.
Enables interpolation around the start and end points for a loop. By default, loop interpolation is off.
Common Box Attributes
The direction and speed of playback of a play~ object can be set using integer messages provided to the play~ object at signal rate. Typically, this is done using a line~ object.
Integer messages come in pairs - an initial integer that specifies the position in the buffer (in milliseconds) at which to start, followed by a second pair of numbers that specify the ending position in the buffer and the time (in milliseconds) over which the playback will occur. These messages are often sent as messages separated by a comma. Here are some examples:
- Starting at the beginning of the buffer, play 2 seconds of audio at normal speed
- Play the first half second of a buffer backwards at normal speed.
- Play the first second of a buffer at double speed (i.e. transpose it up an octave)
|MSP Sampling Tutorial 1: Recording and Playback||MSP Sampling Tutorial 1: Recording and Playback|