From e73eebac6be277bb20d1effc25d4c29900eb1df1 Mon Sep 17 00:00:00 2001 From: Momo Date: Fri, 9 Sep 2011 14:57:09 +0200 Subject: //god/overlord initial commit --- god/overlord | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 god/overlord (limited to 'god/overlord') diff --git a/god/overlord b/god/overlord new file mode 100644 index 00000000..087303cb --- /dev/null +++ b/god/overlord @@ -0,0 +1,8 @@ +#!/bin/bash + +announcement=$1 +LC_ALL=C aplay -l|sed -n 's/^card \([0-9]\+\):.*\[USB Audio\]$/\1/p' + +mplayer -ao=alsa:device=surround40:CARD=default,DEV=0 announce.mp3 +/krebs/util/bin/natural $announcement + -- cgit v1.2.3 From 9d2f77f0ac2b68f280bed7080e40b7e0c122bc89 Mon Sep 17 00:00:00 2001 From: Momo Date: Fri, 9 Sep 2011 15:07:51 +0200 Subject: //god/overlord/overlord: adding announce.mp3 --- god/overlord | 8 -------- god/overlord/overlord | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 god/overlord create mode 100644 god/overlord/overlord (limited to 'god/overlord') diff --git a/god/overlord b/god/overlord deleted file mode 100644 index 087303cb..00000000 --- a/god/overlord +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -announcement=$1 -LC_ALL=C aplay -l|sed -n 's/^card \([0-9]\+\):.*\[USB Audio\]$/\1/p' - -mplayer -ao=alsa:device=surround40:CARD=default,DEV=0 announce.mp3 -/krebs/util/bin/natural $announcement - diff --git a/god/overlord/overlord b/god/overlord/overlord new file mode 100644 index 00000000..c7a79f35 --- /dev/null +++ b/god/overlord/overlord @@ -0,0 +1,8 @@ +#!/bin/bash + +announcement=$1 +LC_ALL=C aplay -l|sed -n 's/^card \([0-9]\+\):.*\[USB Audio\]$/\1/p' + +mplayer -ao alsa:device=hw=$LC_ALL announce.mp3 +/krebs/util/bin/natural $announcement + -- cgit v1.2.3 From aad509b71f5a268e5b40f2b803b6d6fd4894bfbb Mon Sep 17 00:00:00 2001 From: Momo Date: Fri, 9 Sep 2011 15:10:00 +0200 Subject: //god/overlord/: now really adding announce.mp3 --- god/overlord/announce.mp3 | Bin 0 -> 71496 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 god/overlord/announce.mp3 (limited to 'god/overlord') diff --git a/god/overlord/announce.mp3 b/god/overlord/announce.mp3 new file mode 100644 index 00000000..23bca769 Binary files /dev/null and b/god/overlord/announce.mp3 differ -- cgit v1.2.3 From 39026acca1b657ccf5446014ab7ca045c97e9cb3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 9 Sep 2011 19:26:01 +0200 Subject: //god/overlord: making it work --- god/overlord/overlord | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) mode change 100644 => 100755 god/overlord/overlord (limited to 'god/overlord') diff --git a/god/overlord/overlord b/god/overlord/overlord old mode 100644 new mode 100755 index c7a79f35..501afc80 --- a/god/overlord/overlord +++ b/god/overlord/overlord @@ -1,8 +1,19 @@ -#!/bin/bash - -announcement=$1 -LC_ALL=C aplay -l|sed -n 's/^card \([0-9]\+\):.*\[USB Audio\]$/\1/p' - -mplayer -ao alsa:device=hw=$LC_ALL announce.mp3 -/krebs/util/bin/natural $announcement +#! /bin/sh +set -euf +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 90% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 80% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 70% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 60% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 50% +/krebs/streams/streams stop +amixer -q -c 0 -D hw:0 sset Front 100% +mplayer announce.mp3 +/krebs/streams/streams start & +espeak -v de -s 120 -a 900 "$*" +amixer -q -c 0 -D hw:0 sset Front 40% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 50% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 60% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 70% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 80% +sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 90% -- cgit v1.2.3 From 8712dfa17f0dd7b90c646e13d2cd4e0d4c5a11e6 Mon Sep 17 00:00:00 2001 From: krebs Date: Fri, 9 Sep 2011 21:26:15 -0400 Subject: //god/overlord: be the right and only one This commit also makes the //noise module a pure wrapper around the read overlord. --- god/overlord/index | 27 +++++++++++++++++++++++++++ god/overlord/overlord | 19 ------------------- 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100755 god/overlord/index delete mode 100755 god/overlord/overlord (limited to 'god/overlord') diff --git a/god/overlord/index b/god/overlord/index new file mode 100755 index 00000000..27506ccd --- /dev/null +++ b/god/overlord/index @@ -0,0 +1,27 @@ +#! /bin/sh +set -euf + +# cd // +cd $(dirname $(readlink -f $0))/../.. + +max=100 +step=10 +min=0 + +# fade-out streams +for i in `seq $max -$step $min`; do + amixer -q -c 0 -D hw:0 sset Front $i% + sleep 0.1 +done +streams/streams stop + +amixer -q -c 0 -D hw:0 sset Front $max% +mplayer god/overlord/announce.mp3 >/dev/null +espeak -v de -s 120 -a 900 "$*" + +# fade-in streams +streams/streams start +for i in `seq $min $step $max`; do + sleep 0.1 + amixer -q -c 0 -D hw:0 sset Front $i% +done diff --git a/god/overlord/overlord b/god/overlord/overlord deleted file mode 100755 index 501afc80..00000000 --- a/god/overlord/overlord +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh -set -euf - -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 90% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 80% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 70% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 60% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 50% -/krebs/streams/streams stop -amixer -q -c 0 -D hw:0 sset Front 100% -mplayer announce.mp3 -/krebs/streams/streams start & -espeak -v de -s 120 -a 900 "$*" -amixer -q -c 0 -D hw:0 sset Front 40% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 50% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 60% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 70% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 80% -sleep 0.4; amixer -q -c 0 -D hw:0 sset Front 90% -- cgit v1.2.3