Saturday, October 5, 2013

[Linux] HOW TO: Everything about beep!


Hi guys!

Today we will talk about beep in Linux. First, I show you which modules take care of the beep operation.

pcspkr
snd_pcsp

Removing the beep.

To remove just add these modules to the blacklist, and PC will never beeps again.

1) Edit /etc/modprobe.d/blacklist-beep.conf:

sudo nano /etc/modprobe.d/blacklist-beep.conf

2) type in:

blacklist pcspkr
blacklist snd_pcsp

Change beep volume.

To change beep volume use alsamixer program. Inside find beep and change it to chosen value.



Playing with beep.

The easiest way to use the pc-speaker is:


echo -e "\ a"

But if you want to change the key and the length of the tone you need to install the "beep".

sudo apt-get install beep

Now you can change the height, length and the gap between tones. Here is a small sample:

beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392
Options:

-f frequency
-l length
-D delay
-n new tone
Note frequency:

C  = 261.6
C1 = 277.2
D  = 293.7
D1 = 311.1
E  = 329.6
F  = 349.2
F1 = 370.0
G  = 392.0
G1 = 415.3
A  = 440.0
A1 = 466.2
B  = 493.9

C2  = 523.2
C22 = 554.3
D2  = 587.3
D12 = 622.2
E2  = 659.3
F2  = 698.5
F22 = 734.0
G2  = 784.0
G22 = 830.6
A2  = 880.0
A22 = 932.3
B2  = 987.8

Thank you for your attention.
Have fun with that :)


No comments :

Post a Comment