Beep
Jump to navigation
Jump to search
Johnathan's beep beeps with the added ability to control pitch, duration and number of tones, allowing complete flexibility in generating audible feedback from the PC speaker.
How to install
It is best to install beep by means of your distribution. For help see installing Software.
- For Ubuntu
sudo apt-get install beep
If that is not possible, you may download the source code from the author's site
How to use
- Read the man page:
man beep
Options: (not a complete list)
- -f N (frequency - beep at N Hz)
- -l N (duration - beep for N milliseconds)
- -r N (repetitions - beep N times)
- -d N (delay - delay by N milliseconds)
- -n (new - specifies multiple beeps in a string)
Some examples:
- Beep default
$ beep
- Three short beeps at 400 Hz with a short delay of 25 and tone length of 100
$ beep -f 400 -r 3 -d 25 -l 100
- Audible log monitoring (-s use input mode, plays 4 short beeps)
$ tail -f /var/log/messages | grep something | beep -f 2000 -r 4 -l 25 -s
- Play 2 long beeps and several shorter beeps
$ beep -f 1500 -r 2 -n -r 5 -l 12 -n
- Use a random frequency between 400 and 1000 Hz:
$ beep -f $(shuf -i 400-1000 -n 1)
The frequencies are not limited to whole numbers, making it possible to generate accurate musical notes.
Note - Frequency C - 261.6 C# - 277.2 D - 293.7 D# - 311.1 E - 329.6 F - 349.2 F# - 370.0 G - 392.0 G# - 415.3 A - 440.0 A# - 466.2 B - 493.9 C - 523.2