pouët.net

Go to bottom

Experimental music from very short C programs

category: code [glöplog]
Bleh, one more for the generations to come.
((t>>1)^(t>>6))|((t>>1)^(t>>7))+sin(t>>13)

And thou shall I be celebrated like Steve Jobs once my time here is done.
added on the 2011-10-07 00:27:53 by harism harism
sin-less: replace "+sin(t>>13)" by "-(t/24e3&1)"
added on the 2011-10-07 00:32:18 by ryg ryg
This could lead to a new, ultra compact tracker format, for an ultrasmall tracker.

First one must decide which subset of the highlevel language is allowed ; logic, arithmetic (initially it stops here, even mul is questionable in spirit), transcendental, conditional (paradigm shift, it induces machine code flow control ie jumps), local vars and assigments (another step in losing the "formula" spirit), arrays (wat?).

Then make a binary format for this, cause we're real men, not kiddies (more, it's smaller).

Maybe permit direct repetition of sounds explicitly like in a tracker to avoid the burden of masking time by hand etc.

At that point, might aswell define a little instruction set and virtual machine.

However I cant see the interpreter fit in 256b or the like so maybe it's pointless.
Mu6k: awesome, please more!!
how do you do that ryg? its twice as fast. cool math. ;)
added on the 2011-10-07 02:15:25 by yumeji yumeji
yumeji, do what exactly? getting rid of sines?
added on the 2011-10-07 04:54:04 by ryg ryg
Hello: The tool can be 8meg for all intent purposes. What matter is that your little melody is dumped into some .asm text file that you can include in your 256b / 4K project.
Some of those tunes come out to no more then a dozen instructions, much smaller then having to include a compact evaluation + the interpreter.
added on the 2011-10-07 06:23:44 by T21 T21
MidKnight, protip: don't replace t everywhere, just prepend "t*=80/441," :)
added on the 2011-10-07 09:03:59 by ryg ryg
What does
Code:"36364689"[i]
do in JS?
added on the 2011-10-07 09:25:30 by las las
It's the short for: "36364689".charAt(i);
added on the 2011-10-07 09:27:14 by p01 p01
poi/las: and because chars in JS are effectively single-char strings, this will in turn get converted into the corresponding integer. i.e.
Code:"36364689"[i]

is just a shorter way of writing
Code:[3,6,3,6,4,6,8,9][i]
(array literal)
added on the 2011-10-07 09:32:14 by ryg ryg
ryg+las: nitpicking, but "36364689"[i] returns a one character long string while [3,6,3,6,4,6,8,9][i] gives you a Number. ;)
added on the 2011-10-07 09:39:52 by p01 p01
Ahhh ouch, need more coffee ;)
Thanks ryg.
added on the 2011-10-07 09:40:29 by las las
poi, but that's just what i said in the first line of my reply!
added on the 2011-10-07 09:43:20 by ryg ryg
WHAT THE FUCK.
added on the 2011-10-07 10:01:44 by las las
what the fuck
nice, the two changes combine
357 chars. original was 607 chars. if we manage to get something resembling the original down to <=303 bytes (less than half), i vote for calling the result "information theory" :)
added on the 2011-10-07 10:37:47 by ryg ryg

login

Go to top