AudioLoadTone |
Top Previous Next |
Message
AudioLoadTone <audiodevicenumber>|<alias> <soundname> <frequency> square|sine|sawtooth|tone [<duration_ms>]
Originator
Client
Response
SyntaxError: insufficient parameters to AudioLoadTone SyntaxError: invalid parameters to AudioLoadTone Error: failed to load Tone on Audio <audiodevicenumber> (<alias>) Info: loaded Tone on Audio <audiodevicenumber> (<alias>)
Response (immediate socket)
Success Failure
Details
Loads (creates) a simple tone of given frequency (Hz) and gives the sound a name; the sound can be used in exactly the same way as a WAV sound loaded with AudioLoadSound.
The waveform of the tone can be chosen from:
The optional <duration_ms> parameter sets the duration in milliseconds (default: 1000 ms, or 1 s).
To play the sound for long periods, consider setting a short sound to repeat (AudioPlaySound -loop) and cancel it after the desired time.
Revision history
Implemented by WhiskerServer version 2.3.
See also
|