DiskIn:
Filter:
Classes | UGens > InOut | UGens > Buffer

DiskIn : MultiOutUGen : UGen : AbstractFunction : Object

Stream in audio from a file.
Source: DiskIO.sc

Description

Continuously play a longer soundfile from disk. This requires a buffer to be preloaded with one buffer size of sound.

Class Methods

DiskIn.ar(numChannels, bufnum, loop: 0)

Arguments:

numChannels

Number of channels. This must match the number of channels in the buffer.

bufnum

Buffer number

NOTE: The Buffer's numFrames must be a power of two and is recommended to be at least 65536 -- preferably 131072 or 262144. Smaller buffer sizes mean more frequent disk access, which can cause glitches.
loop

If set to 1, the soundfile will loop.

NOTE: If the buffer has a larger number of frames than the sound file there will be a noticeable gap between the first and the following loop iterations. In that case chose a smaller buffer size or use PlayBuf instead

Discussion:

This UGen will set the 'done' flag when finished playing.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

Normal usage (with Buffer; "Object Style")

OSC Messaging Style