Absurd Minds
http://forums.absurdminds.net/

mario.sh
http://forums.absurdminds.net/viewtopic.php?f=58&t=3675
Page 1 of 1

Author:  GoatMips [ 05 Sep 2016 15:54 ]
Post subject:  mario.sh

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

Author:  bLiNd [ 06 Sep 2016 00:30 ]
Post subject:  Re: mario.sh

nice! i approve!

Author:  Amaroq [ 06 Sep 2016 06:44 ]
Post subject:  Re: mario.sh

That's hilarious.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/