scripts/beep: tweak
This commit is contained in:
parent
3a526328bc
commit
4bdddd6451
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
n=3
|
n=3
|
||||||
case "$5" in
|
case "$5" in
|
||||||
LOW) n=1 ;;
|
LOW) n=1 ;;
|
||||||
NORMAL) n=3 ;;
|
NORMAL) n=3 ;;
|
||||||
CRITICAL) n=5;;
|
CRITICAL) n=5 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
lock=/tmp/.beep-lock
|
lock=/tmp/.beep-lock
|
||||||
@ -16,7 +16,7 @@ import sys, numpy as np
|
|||||||
t = np.arange(0, 0.25, 1/48000)
|
t = np.arange(0, 0.25, 1/48000)
|
||||||
for i in range($n):
|
for i in range($n):
|
||||||
tone = np.random.choice([0,3,5,6,7,10,12])
|
tone = np.random.choice([0,3,5,6,7,10,12])
|
||||||
note = 0.2 * np.sin(np.pi * 650 * 2**(tone/12) * t)
|
note = 0.8 * np.sin(np.pi * 650 * 2**(tone/12) * t)
|
||||||
sys.stdout.buffer.write(np.int32(2**31 * note).tobytes())
|
sys.stdout.buffer.write(np.int32(2**31 * note).tobytes())
|
||||||
" | aplay -c 1 -f S32_LE -r 48000 -Dbeep
|
" | aplay -c 1 -f S32_LE -r 48000 -Dbeep
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user