RedSFPlayer:
Filter:
Classes (extension) | Red > redSF

RedSFPlayer : Object
ExtensionExtension

plays soundfiles (from memory)
Subclasses: RedSFPlayerDisk

Description

Based on PlayBuf. Use RedSFPlayerDisk for playing back soundfiles from disk instead.

Class Methods

RedSFPlayer.new(server)

Create a new player on a Server.

Arguments:

server

If nil it will use Server.default.

RedSFPlayer.read(path, server)

Create a new player on a Server.

Arguments:

path

A String pointing to a soundfile.

server

If nil it will use Server.default.

Inherited class methods

Instance Methods

.read(path)

The server should be booted before reading.

Arguments:

path

A String pointing to a soundfile.

.loop(out: 0, rate: 1, fadeTime: 0)

.play(out: 0, rate: 1, fadeTime: 0)

Starts playing the soundfile.

Arguments:

out

Output bus.

rate

Playback rate.

fadeTime

In seconds.

.stop(fadeTime: 0)

Arguments:

fadeTime

In seconds.

.free

Stop playing and free internal buffer.

.amp = val

Get or set the amplitude.

.isPlaying

A Boolean

.duration

Length of the soundfile in seconds. Updated after reading.

.channels

Number of channels of the soundfile. Updated after reading.

Inherited instance methods

Undocumented instance methods

.buffer

.makeWindow

.server

.server = value

.synth

Examples