SPlayFile:
Filter:
Classes (extension) | SInstruments

SPlayFile
ExtensionExtension

a player for short soundfiles (mono)
Location: NOT INSTALLED!

Description

This class is a wrapper for BufRd and will take any soundfile with 1, 2 or 4 channels (by default) and play it from memory (RAM). The resulting sound is mixed down to MONO. Use the subclasses SPlayFileStereo for mixing down to STEREO, and SPlayFileQuad for QUAD.

For a graphical user interface use it together with the class SPlayFileView.

NOTE: This class is for playing back shorter soundfiles from memory and it is using Buffer to read the file. For longer soundfiles use the class SPlayFileDisk instead as it streams from disk using VDiskIn.

Class Methods

Inherited class methods

Instance Methods

.frame

Get currently playing frame i.e. the current position in the (latest started) soundfile.

Returns:

a Float that is roughly indicates playhead position.

.maxNumInactiveBuffers

The maximum number of buffer objects to keep in the -buffers list. Buffers not frequently played will be removed and free'd.

.buffers

A List of Buffer objects.

.read

Can be used to preload buffers.

Arguments:

path

A String pointing to a soundfile.

Inherited instance methods

Examples