mcs.play~
Description
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~.
Arguments
buffer-name [symbol]
The first argument names the buffer~ object whose sample memory is used by play~ for playback.
number-of-output-channels [int]
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.
Attributes
interptime [float]
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.
loop [int]
In loop mode, when playback reaches the end time (see
message) it continues again from the start time. Loop mode is off by default.loopinterp [int]
Enables interpolation around the start and end points for a loop. By default, loop interpolation is off.
Common Box Attributes
Messages
int
Arguments
(mouse)
pause
resume
set
Arguments
signal
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)
start
Arguments
end-time [list]
duration [list]
stop
Output
See Also
Name | Description |
---|---|
2d.wave~ | |
buffer~ | |
buffir~ | |
groove~ | |
record~ | |
wave~ | |
index~ | |
MSP Sampling Tutorial 1: Recording and Playback | MSP Sampling Tutorial 1: Recording and Playback |