summaryrefslogtreecommitdiffstats
path: root/noise/modules/overlord
blob: 6edb0fd8b104e5c59ade989d0424e118bdc4fd65 (plain)
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
#! /bin/sh
set -euf

announce() {
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 90%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 80%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 70%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 60%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 50%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 40%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 30%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 20%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 10%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 0%
/krebs/streams/streams stop
amixer -q -c 0 -D hw:0 sset Front 100%
mplayer /krebs/god/overlord/announce.mp3
espeak -v de -s 120 -a 900 "$*"
/krebs/streams/streams start
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 0%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 10%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 20%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 30%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 40%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 50%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 60%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 70%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 80%
sleep 0.1; amixer -q -c 0 -D hw:0 sset Front 90%
}

case "$1" in
   --help) echo "Make an announcement! Usage: /overlord <text>";;
   *) announce "$@";;
esac