Offline

thread currently going on at pouet.net

Offline
A gray world of dread

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?)

Offline

This made my day.

Offline
Tacoma WA

blew my mind when viznut posted this on facebook.

Offline
Sweeeeeeden

µ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.

Offline

relevant

Offline
A gray world of dread
nitro2k01 wrote:

µ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?

Offline
Sweeeeeeden

Not circular. That operation is actually usually called a rotation.

Offline
Nomad's Land

awesome! i have no idea how it works but these examples sure are impressive.

Offline

The exploration continues!

Offline
Russia, Moscow

I understand how this works, but it impresses me a lot anyway.

Offline
Tokyo, Japan

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.

Offline
Unsubscribe

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.

Offline
killadelphia

math is music!

Offline
Sweden

Finally a home for bad PRNGs!

Offline
ad-hell-aide

Very nice! The outcome sounds similar to connecting together certain logic chips in a simple pattern.