I got bored.
Code:
#!/bin/bash
MELODY=(2637 2637 0 2637 0 2093 2637 0 3136 0 0 0 1568 0 0 0 2093 0 0 1568 0 0 1319 0 0 1760 0 1976 0 1865 1760 0 1568 2637 3136 3520 0 2794 3136 0 2637 0 2093 2349 1976 0 0 2093 0 0 1568 0 0 1319 0 0 1760 0 1976 0 1865 1760 0 1568 2637 3136 3520 0 2794 3136 0 2637 0 2093 2349 1976 0 0)
TEMPO=(12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 9 9 9 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 9 9 9 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12)
COUNT=0
while [ $COUNT -lt 78 ]
do
TONE=${MELODY[COUNT]}
COUNT=$((COUNT+1))
LENGTH=$((10 * ${TEMPO[COUNT]}))
SLEEP=`echo "scale=3 ; $LENGTH / 1000" | bc`
if [ "$TONE" == "0" ]; then
sleep $SLEEP
echo "sleep $SLEEP"
else
beep -f $TONE -l $LENGTH
echo "beep -f $TONE -l $LENGTH"
fi
done
https://www.youtube.com/watch?v=KgH5tCOlKfo