SoundBeep

Emits a tone from the PC speaker.

SoundBeep Frequency, Duration

Note: On Linux, the tone is played through an external audio player. If none of the players listed under SoundPlay is installed, an error is thrown.

Parameters

Frequency

Type: Integer

If omitted, it defaults to 523. Otherwise, specify the frequency of the sound, a number between 37 and 32767.

Duration

Type: Integer

If omitted, it defaults to 150. Otherwise, specify the duration of the sound, in milliseconds.

Remarks

The script waits for the sound to finish before continuing. In addition, system responsiveness might be reduced during sound production.

If the computer lacks a sound card, a standard beep is played through the PC speaker.

Linux

The tone is synthesized and handed to the same external player SoundPlay uses, so Frequency and Duration are honoured. Because the tone is a WAV, any of the listed players can play it.

macOS

The tone is synthesized and played through afplay, so Frequency and Duration are honoured.

To produce the standard system sounds instead of beeping the PC Speaker, see the asterisk mode of SoundPlay.

SoundPlay

Examples

Plays the default pitch and duration.

SoundBeep

Plays a higher pitch for half a second.

SoundBeep 750, 500