Classes | UGens > Buffer

PlayBuf : MultiOutUGen : UGen : AbstractFunction : Object

Sample playback oscillator.


Plays back a sample resident in memory.

Class Methods, bufnum: 0, rate: 1.0, trigger: 1.0, startPos: 0.0, loop: 0.0, doneAction: 0), bufnum: 0, rate: 1.0, trigger: 1.0, startPos: 0.0, loop: 0.0, doneAction: 0)



Number of channels that the buffer will be. This must be a fixed integer. The architecture of the SynthDef cannot change after it is compiled.


The index of the buffer to use.

NOTE: If you supply a bufnum of a buffer with a differing number of channels than the one specified in this PlayBuf, it will post a warning and output the channels it can.

1.0 is the server's sample rate, 2.0 is one octave up, 0.5 is one octave down -1.0 is backwards normal rateā€¦ etc. Interpolation is cubic.


A trigger causes a jump to the startPos. A trigger occurs when a signal changes from negative value to positive value.


Sample frame to start playback.


1 means true, 0 means false. This is modulateable.


an integer representing an action to be executed when the buffer is finished playing. This can be used to free the enclosing synth, etc. See Done for more detail. doneAction is only evaluated if loop is 0.

Inherited class methods

Instance Methods

Inherited instance methods


In the above example, note how the doneAction: Done.freeSelf causes the synth to free itself when the buffer reaches its end.

Note again that the number of channels must be fixed for the SynthDef. It cannot vary depending on which buffer you use.