LoopBuf:
Filter:
Classes (extension) | UGens > Buffer

LoopBuf : MultiOutUGen : UGen : AbstractFunction : Object
ExtensionExtension

sample looping oscillator
Source: LoopBuf.sc

Description

Plays and loops between two frames of a sample resident in memory.

Class Methods

LoopBuf.ar(numChannels, bufnum: 0, rate: 1.0, gate: 1.0, startPos: 0.0, startLoop, endLoop, interpolation: 2)

Arguments:

numChannels

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.

WARNING: if you supply a bufnum of a buffer that has a different numChannels then you have specified to the LoopBuf, it will fail silently.
bufnum

the index of the buffer to use

rate

- 1.0 is normal, 2.0 is one octave up, 0.5 is one octave down. -1.0 is backwards normal rate ... etc.

gate

positive gate starts playback from startPos. negative gate plays rest of sample from current position

startPos

sample frame to start playback

startLoop

sample frame of start of loop

endLoop

sample frame of end of loop

interpolation

1 means no interpolation, 2 is linear, 4 is cubic interpolation

Inherited class methods

Instance Methods

Inherited instance methods

Examples