4 ms·
Linuxwave: Generate Music from the Entropy of Linux
- dimatura 4y agoCertainly an improvement on the ol' "cat /dev/urandom > /dev/audio"!
- bertman 4y agoOr (from the readme): 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+1]/12)*log(2))*i)) }' | xxd -r -p | aplay -c 2 -f S32_LE -r 16000
- FeepingCreature 4y ago"sudo mplayer -demuxer rawaudio -ao alsa:device=hw=0.0 /dev/sd* /dev/nvme*" Hard drive is more fun than urandom because it actually contains audibly structured data. Note: You may have to stop Pulseaudio or Pipewire if you have it running. Note: May create very loud noises or even break your headphones.
- prohobo 4y agoI took on a similar project recently, and realized the data sounds boring (as anyone would), but I wonder if instead of generating notes from data you could map to a scale of motifs. If you write the motifs to seamlessly transition then you can get musical data without any manual steps (besides the definition of the motifs).
- ace2358 4y agoI always thought Zelda: Breath of the Wild did this really well. The game generally doesn’t have music during world traversal. Slight piano motifs here and there. You could get the music change and the scenario was changing, either a town or an enemy or a secret. Becomes sort of another sense. I know other games have done this very well.
- yellowapple 4y agoGroovy! Took a bit of finagling¹ to get it to build under Zig master², and it looks like my machine doesn't like playing some of the "presets" with sample rates below 4000Hz, but it's certainly a fun little gadget. ---- ¹: https://github.com/orhun/linuxwave/pull/8 https://github.com/orhun/linuxwave/pull/8 ²: I could've just did an "asdf install zig 0.10" and plopped in a corresponding ".tool-versions", or just used the Dockerfile, but what's the fun in that?
- zX41ZdbW 4y agoAlso take a look at the recent project: NoiSQL — Generating Music With SQL Queries https://github.com/ClickHouse/NoiSQL https://github.com/ClickHouse/NoiSQL
- Jeff_Brown 4y agoI was hoping for something less sanitized, that gives more insight into what the processor is doing, like this: https://m.youtube.com/watch?v=kPRA0W1kECg https://m.youtube.com/watch?v=kPRA0W1kECg This, though, falls into the enormous genre of algorithms that take some cool phenomenon (often pi) and then quantize it to some tempo, and some scale, and some set of samples, thereby killing everything that was interesting about the original phenomenon.
- chinaman425 4y ago[dead]