produces a tone
- CALL SOUND( freq<, dur>);
The inputs to the SOUND subroutine are as follows:
The SOUND subroutine generates a tone using freq for
frequency (in hertz) and dur for duration (in seconds).
Matrices may 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).
- is a numeric matrix or literal giving the frequency in hertz.
- is a numeric matrix or literal giving the duration in seconds.
Note that the dur argument
differs from that in the DATA step.
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));
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.