amplitude derived from ygSoundServer | Example | Source | Header |
Messages |
threshold | float | set the minimum amplitude threshold |
filter | float | set the first order filter constant (percent contribution) |
play | [bool] | start monitoring the input signal |
stop | [bool] | stop the playing sound |
updateInterval | float | set the update interval for sound server |
Events |
start | ||
stop | ||
changed | value | generate changed event with $value |
Comments |
constructor amplitude
destructor ~amplitude
method reset
1 reset playing flag to false
2 set threshold to 0.2
3 set filter to 0.8
4 set current amplitude to 0.0
5 set update interval to 0.05
6 if a sample exists then delete it
method message
1 set the minimum amplitude threshold
2 set the first order filter constant (percent contribution)
3 start monitoring the input signal
4 stop the playing sound
5 set the update interval for sound server
method setDistance
method setAmplitude
method setFalloffDistance
method setAttenuation
method isPlaying
method isPaused
method play
1 if no sample then create a new bergenAmplitude
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.0.1 generate changed event with $value
1.2.1.1 determine position of this sound
1.2.1.2 get position relative to CAVE