Skip to main content

blockly > WorkspaceAudio > beep

WorkspaceAudio.beep() method

Plays a beep at the given frequency.

Signature:

beep(tone: number, duration?: number): Promise<void>;

Parameters

Parameter

Type

Description

tone

number

The frequency of the beep to play, in hertz.

duration

number

(Optional) The duration of the beep, in seconds. Defaults to 0.2.

Returns:

Promise<void>