tone derived from ygSoundServer Example Source Header

Description: creates a positional tone at a specified frequency within a space

notes:
Category: Sound
Author: Alex Hill
Revision: 08/01/03

    Messages
frequency float set the frequency of the tone
play [bool] start the sound playing
stop [bool] stop the playing sound
updateInterval float set the update interval for sound server
    Events
start
stop
    Comments

constructor tone

destructor ~tone

method reset

1 reset frequency to 600.0
2 reset playing flag to false
3 set current amplitude to 0.0
4 set update interval to 0.1
5 if a sample exists then delete it

method message

1 set the frequency of the tone
2 start the sound playing
3 stop the playing sound
4 set the update interval for sound server

method setFrequency

method setDistance

method setAmplitude

method setFalloffDistance

method setAttenuation

method isPlaying

method isPaused

method play

1 if no sample then create a new bergenSample
2 play the sample
3 generate a heartbeat for the server

method pause

method stop

1 if a sample is playing
1.1 send a stop command to the server

method app

1 if a sample exists
1.1 generate a heartbeat for the server
1.2 if the sample is playing
1.2.1 if update interval has passed then update sound server
1.2.1.1 determine position of this sound
1.2.1.2 get position relative to CAVE