In 2011 Viznut posted a blog post called “Algorithmic symphonies from one line of code – how and why?”. He described a way to generate algorithmic 8-bit synth compositions in a single line of C. For example,
You’d compile that program and pipe it to your soundcard, and it would play an ever-evolving piece of noise music.
This is so fucking cool. That little equation
t*(((t>>12)|(t>>8))&(63&(t>>4))) will tweak the bits of the value of the current time step as a kind of chaos process that actually sounds great!
I wanted to see if I could do that automatically.
I then use Llama.cpp’s grammar decoder to constrain the output to valid one-liners. Those one-liners are then evaluated and converted to audio.
Cover image by https://replicate.com/yash-banka/moon