-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashpad
executable file
·67 lines (62 loc) · 1.55 KB
/
bashpad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
echo "========================================"
echo "Super Mega Awesome Drumpad for the shell"
echo "Volume Controls: <+|=> and <->"
echo "Press <esc> to exit"
echo "========================================"
echo "GitHub: github.com/bmiddha/bash-drumpad"
echo ""
echo "Time to bash the keyboard. You'll figure it out."
while true; do
read -rsn1 input
case $input in
"a" | "s" | "q" | "w")
aplay -q samples/snare.wav&
;;
"p" | "[" | "'" | ";")
aplay -q samples/kick.wav&
;;
"i" | "o")
aplay -q samples/hatc.wav&
;;
"l" | "k")
aplay -q samples/hato.wav&
;;
"b" | "n")
aplay -q samples/tom1.wav&
;;
"m" | ",")
aplay -q samples/tom2.wav&
;;
"." | "/")
aplay -q samples/tom3.wav&
;;
"y" | "u")
aplay -q samples/tamb.wav&
;;
"h" | "j")
aplay -q samples/clap.wav&
;;
"z" | "x")
aplay -q samples/rim.wav&
;;
"r" | "e" | "d" | "f")
aplay -q samples/crash.wav&
;;
"c" | "v")
aplay -q samples/ride.wav&
;;
"\\")
aplay -q samples/rubberChiken.wav&
;;
"=" | "+")
amixer -q sset "Master" 5%+
;;
"-")
amixer -q sset "Master" 5%-
;;
$'\e')
exit
;;
esac
done