RedSFPlayerDisk plays soundfiles (from disk)


Inherits from: RedSFPlayer


based on VDiskIn

see also RedSFPlayer for playing back soundfiles from memory.



*new(server)

*read(path, server)

create a new player on a Server.  if server is nil it will use Server.default.

read(path)

path should be a String pointing to a soundfile.

the server should be booted before reading.

loop(out, rate, fadeTime)

play(out, rate, fadeTime)

starts playing the soundfile.

out - out bus.  default is 0.

rate - playback rate.  default is 1.  NOTE: for disk player version rates can not be negative.

fadeTime - in seconds.  default is 0.  NOTE: for disk player version there is no crossfade of loops.

stop(fadeTime)

fadeTime - in seconds.  default is 0.

free

stop playing and free internal buffer.

amp

gets the amplitude.  default is 1.

amp_(val)

sets the amplitude.

isPlaying

boolean

<>server

<buffer

<synth

<duration

length of the soundfile in seconds.  updated after reading.

<channels

number of channels of the soundfile.  updated after reading.



//--

s.boot;

a= RedSFPlayerDisk.new

a.read("sounds/a11wlk01-44_1.aiff")

a.play //default is play out on bus 0 with rate 1 and 0 fadeTime

a.stop


a.loop(0, 3, 4) //start looping with long fadeTime and high rate

a.loop(0, 1.2) //another loop (crossfade will not work and fadeTime is ignored)

a.stop(4) //fadeout


a.free