Advertisement
_d3f4ult

[+] Create Music w/ Entropy from /dev/urandom [+]

Apr 23rd, 2016
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,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 1600
  2.  
  3.  
  4. // source: http://blog.robertelder.org/bash-one-liner-compose-music/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement