Skip to content

Instantly share code, notes, and snippets.

@dirtyc0wsay
Last active January 15, 2018 00:48
Show Gist options
  • Save dirtyc0wsay/6e0c57ada311fdc45043eee7a33fc2a5 to your computer and use it in GitHub Desktop.
Save dirtyc0wsay/6e0c57ada311fdc45043eee7a33fc2a5 to your computer and use it in GitHub Desktop.
hmmm
cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,3,5,6,7,10,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1382*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | aplay -c 2 -f S32_LE -r 24000
cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("4,5,7,11",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1046*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | aplay -c 2 -f S32_LE -r 24000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment