CALL SOUND (freq <, dur> );
The SOUND subroutine generates a tone with a frequency (in hertz) given by the freq parameter and a duration (in seconds) given by the dur parameter.
The arguments to the SOUND subroutine are as follows:
is a numeric matrix or literal that contains the frequency in hertz.
is a numeric matrix or literal that contains the duration in seconds. Note that the dur argument differs from that in the DATA step.
Matrices can be specified for frequency and duration to produce multiple tones, but if both arguments are nonscalar, then the number of elements must match. The duration argument is optional and defaults to 0.25 (one quarter second).
For example, the following statements produce tones from an ascending musical scale, all with a duration of 0.2 seconds:
notes = 400#(2##do(0, 1, 1/12)); call sound(notes, 0.2);