#!/bin/bash if ! which aplay >/dev/null 2>&1; then echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo "!! This requires ALSA's aplay. !!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" exit fi echo "===========================================" echo "== Fox News Sequencer ==" echo "== ------------------ ==" echo "-- Clips are property of Fox News --" echo "-- http://bit.ly/dTptl4 --" echo "-- Music is property of Jason Donenfeld --" echo "-- http://jasondonenfeld.com --" echo "-- --" echo "-- By using you waive the right to distr --" echo "-- ibute anything made with this program --" echo "-------------------------------------------" echo echo echo "== keys ==" echo "- f - nutty" echo "- j - with love" echo "- n - graduate degree" echo "- v - young folks" echo "- h - sandwich" echo "- ctrl+c - quit" echo echo -n "Keys: " aplay backing.wav >/dev/null 2>&1 & pid=0 while read -n 1 c; do if [ $c == "f" ]; then f="nutty.wav" elif [ $c == "j" ]; then f="withlove.wav" elif [ $c == "n" ]; then f="graduatedegree.wav" elif [ $c == "v" ]; then f="youngfolks.wav" elif [ $c == "h" ]; then f="sandwich.wav" else continue fi if [ $pid -gt 0 ]; then kill -9 $pid 2>/dev/null & fi aplay $f >/dev/null 2>&1 & pid=$! done