Algorithmic symphonies from one line of code (2011)
Interesting comments from about ten years ago, https://news.ycombinator.com/item?id=3063359
Bitshift Variations in C Minor. Really gets going after a while: https://soundcloud.com/robertskmiles/bitshift-variations-in-...
I made a synth a few years back that lets you use a bytebeat formula as a signal generator. The `t` variable which represents the 8kHz sample rate of the audio in a typical bytebeat is instead proportional to the frequency of the pitch of the pressed key. There is also a `tt` variable, "tempo time", where the sample rate is proportional to a global tempo, making it easy to make beatsynced rhythms. The bytebeat itself can be written in either JavaScript, WebAssembly Text format, or a little stack based language that can be written in either RPN or S-expressions, which compiles to Wasm and is basically a thin wrapper around the Wasm semantics, which is why it doesn't include the DUP and SWAP commands from the original Glitch machine. It works with WebMIDI too, so you can hook up a keyboard to it.
It's here if anyone wants to play about with it. https://stellartux.github.io/websynth/
From article:
> This would make it possible, for example, for a 256-byte demoscene production to have an interesting and varying audiovisual structure with a strong, inherent synchronization between the effects and the music.
6 years later: https://www.youtube.com/watch?v=sWblpsLZ-O8
BitWiz is an ios app that lets you play with bytebeat stuff. I've spent a lot of time with it (though, mostly years ago).
https://apps.apple.com/us/app/bitwiz-audio-synth/id522046655
From the "BitWiz Audio Synth" iOS app, this is a surprisingly complex tune for such a simple input.
(not my work, just one of the examples it came with)(((t*15) & (t>>5)) | ((t*5) & (t>>(3+c))) | ((t*2) & (t>>9)) | ((t*8) & (t>>11))) - 3Here's an example to get you started. Compile and run with ./progname | tee /dev/tty | aplay
you can also pipe it into other programs like xxd: ./progname | xxd | tee /dev/tty | aplay
#include <stdio.h>
#include <math.h>
int main()
{
int t; for ( t=0; ; t++ ) putchar( t*((t>>7|t>>13)&73&t>>6) ); }I managed to get MicroPython versions of these working on a micro:bit with the speaker directly plugged into the IO pins. Lots of fun, and MicroPython was definitely quick enough. :-)
Did they ever get to encode things like rhythm or vocals?