thread currently going on at pouet.net
Amending this with the youtube examples because they're damned impressive:
My binary operator lore is weak. I don't get things like t>>13 (t is just 8 bits right? why shift it 13 digits?)
This made my day.
blew my mind when viznut posted this on facebook.
µB: t is an int, 32 or 64 bits or so. The clever thing here is that they define t as the argument to main, which shaves away a few bytes of source code (Normally int t; or so). putchar also takes an int, but as far as I understand it, it truncates the output to 8 bits, which is what gets sent to stdout and then into /dev/audio.
This is really a form of extended linear feedback shift register, a bit like, you guessed it, shitwave. And this might serve as inspiration for a new version of just that in the future.
relevant
µB: t is an int, 32 or 64 bits or so. The clever thing here is that they define t as the argument to main, which shaves away a few bytes of source code (Normally int t; or so). putchar also takes an int, but as far as I understand it, it truncates the output to 8 bits, which is what gets sent to stdout and then into /dev/audio.
Ah, ok. I was assuming that t is a char, and auto-truncates each time it exceeds 255. Is the binary shift circular in C?
Not circular. That operation is actually usually called a rotation.
awesome! i have no idea how it works but these examples sure are impressive.
The exploration continues!
I understand how this works, but it impresses me a lot anyway.
Forgive me but would someone be sweet enough to really dumb this down for me and explain it like im 5? It sounds awesome but I feel I am missing a bit of the awesome due to lack of background knowledge.
I'm dumb too, but it seems you are running a simple math program in c, and sending the output to the audio device directly where it is interpreted as rhythmic audio.
math is music!
Finally a home for bad PRNGs!
Very nice! The outcome sounds similar to connecting together certain logic chips in a simple pattern.