SOUND Statement (BASIC)

Generates a sound through your computer's speaker.

Syntax

SOUND frequency, duration

Parameters

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 TP 1000 STEP 5 
SOUND i%, i% / 1000 
NEXT i%