| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#N) The Play Tone command generates ascii escape sequences which set the frequency and duration of tones generated by the system speaker. The tones are played after an optional delay.
Tones without a delay argument are played immediately, so if you want
to play two one-second
tones in sequence, for example, you will need to add a (#W1000) after
the first (#N), or put a delay of 1000 in the second (#N)
in order for the second (#N) to be heard.
The tones are actually played by a child process which is forked from cogsys. Once the child process issues the system command to play the tone (after any specified delay), the child process then dies. This allows the parent process to perform simultaneous stimulus presentation or response processing while a delayed-onset tone is being generated.
The maximum frequency allowed is 5000 Hz and the maximum duration
of the tone is 2000 milliseconds. These limits are inherent in the
"setterm -bfreq" and "settern -blength" commands, which #N
simulates. There is no limit effective to the delay argument.
#N
#N[freq,duration[,delay]]
freq is the frequency in Hz; duration is the duration in milliseconds; delay is the onset in milliseconds
#N[1000,2000]
#N[1500,1000,500]