Skip to content

Instantly share code, notes, and snippets.

@tado
Created September 6, 2015 03:14
Show Gist options
  • Save tado/f20dcfc9ad734ad129bd to your computer and use it in GitHub Desktop.
Save tado/f20dcfc9ad734ad129bd to your computer and use it in GitHub Desktop.
#!/bin/bash
S="$1"
(echo "main(t){for(t=0;;t++)putchar($S);}" | clang -x c - -w -o /tmp/bytebeat && /tmp/bytebeat | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio)
@tado
Copy link
Author

tado commented Sep 6, 2015

usage:
% ./byteBeat.sh "(t>>6|t|t>>(t>>16))*10+((t>>11)&7)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment