3 ms·
Here's Ryukyu (Okinawa) Japanese music scale cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("4,5,7,11",a,","); for (i = 0; i < 1; i+= 0.0001) pr
by unsignedint 11y ago
Here's Ryukyu (Okinawa) Japanese music scale
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
- laumars 11y agoUnfortunately markdown formatting has broken your code. I can make a guess based on where the italics starts and ends, but you might want to indent that code.
- unsignedint 11y agoOops, I'm sorry. Looks better now?