qbasic.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SOUND Statement
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Generates a sound through your computer's speaker.
 
SOUND frequency, duration
 
    ■ frequency    The frequency of the sound in hertz; a value in the range
                   37 through 32,767.
    ■ duration     The number of system clock ticks the sound lasts; a value
                   in the range 0 through 65,535. There are 18.2 clock ticks
                   per second.
 
Example:
    FOR i% = 440 TO 1000 STEP 5
    SOUND i%, i% / 1000
    NEXT i%
 
See Also    PLAY