#! /bin/bash
# Runs the executable a.out, takes whatever it prints to stdout, and treats it as 8-bit audio at 8khz.
# Volume is determined by command line argument- 0.5 is about right for listening to. Something smaller would work better as a background music, like 0.25 or 0.125.
./a.out | play -r 8000 -t raw -e unsigned-integer -b 8 -v $1 -
echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(){int i; int n; int s; for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -w -&&