aboutsummaryrefslogtreecommitdiffstats
path: root/bin/bytebeat.sh
blob: 71c614beaf7f2880e1d3384524ec9930d7479a2e (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env sh

FORMULA="(t>>6)&(2*t)&(t>>1)"

if [ $1 ]; then
    FORMULA=$1
fi


echo "$FORMULA"
echo "main(t){for(t=0;;t++)putchar($FORMULA);}"  | gcc -x c -o /tmp/bytebeat - && /tmp/bytebeat | aplay -f U8 -r 8000 -c 1 -q