Product SiteDocumentation Site

7.4.6. BEEP


>>-BEEP(frequency,duration)------------------------------------><

Sounds the speaker at frequency (Hertz) for duration (milliseconds). The frequency can be any whole number in the range 37 to 32767 Hertz. The duration can be any number in the range 1 to 60000 milliseconds.
This routine is most useful when called as a subroutine. A null string is returned.

Note

Both parameters (frequency, duration) are ignored on Windows 95 and Linux. On computers with multimedia support the function plays the default sound event. On computers without soundcard, the function plays the standard system beep (if activated).
Here is an example for Windows NT:

Example 7.11. Builtin function BEEP

/* C scale */
note.1 = 262    /* middle C */
note.2 = 294    /*    D     */
note.3 = 330    /*    E     */
note.4 = 349    /*    F     */
note.5 = 392    /*    G     */
note.6 = 440    /*    A     */
note.7 = 494    /*    B     */
note.8 = 523    /*    C     */

do i=1 to 8
call beep note.i,250    /* hold each note for */
/* one-quarter second */
end