Sound

Syntax1 - play one of standard sounds

bee [sound]

 

Syntax2 - play wave file

bee[+] wavefile

 

Syntax3 - PC speaker

bee frequency duration

 

Parameters

sound - one of standard Windows sounds that are specified in Control Panel.

0 (default) Default Beep.
1 Critical Stop (error).
2 Question. In latest Windows versions this sound is disabled by default.
3 Exclamation (warning).
4 Asterisk (information).
-1

A simple beep. If the sound card is not available, the sound is generated using the speaker.

wavefile - sound file path.

frequency - frequency, 37 - 32767 Hz.

duration - duration, ms.

 

Options:

Default Play asynchronously (continue macro immediately).
+ Play synchronously (wait until sound stops).

 

Remarks

Syntax2: Supported are only files with .wav extension. If wavefile not found, plays default sound. If wavefile is "", stops currently playing sound.

 

Syntax3: Usually, if there is no PC speaker, uses soundcard. On Windows 7 always uses soundcard. On Vista does not work.

 

See also: Play (play audio file of any format)

 

Examples

bee ;;default sound
bee 1 ;;play one of default sounds (0 to 4)
bee "c:\m\moo.wav" ;;play file
bee "$windows$\Media\chimes.wav" ;;play file in Windows media folder
bee "" ;;stop sound