pouët.net

Experimental music from very short C programs

category: code [glöplog]
HARDCORE

t*(t/256)-t*(t/255)+t*(t>>5|t>>6|t<<2&t>>1)

I'm satisfied enough with the harsh rythm :)
added on the 2011-10-03 09:26:36 by rez rez
*MEH*

I previously posted the wrong URL!

here is the GOOD ONE:
t*(t/256)-t*(t/255)+t*(t>>5|t>>6|t<<2&t>>1)
added on the 2011-10-03 09:27:53 by rez rez
Some REALLY cool micro tunes.

rez: I dunno which language you wrote this in, but in JavaScript Numbers are 64bits floats cast to 32bits integers when applied a bitwise operation.

Therefore foo<<128 makes little sense. In effect it just round the variable foo. Here the variable t is already an integer, so... t<<128 === t.
added on the 2011-10-03 09:49:06 by p01 p01
p01: thank a lot for the hint, in fact I entered some random value fastly and when it sounded fine I didn't changed them :D
added on the 2011-10-03 10:02:38 by rez rez
Isn't the difference in number representation in JS and on lower level hardware kind of a problem? Wouldn't it make sense to make a 8-bit register, a 16-bit register, and a 32-bit register version? If so, would that require a minimal interpreter of a kind? I might work on it...
Quote:
Isn't the difference in number representation in JS and on lower level hardware kind of a problem?


Isn't the entire point of interpreted code to specify the language exactly and then leave the burden of such details to the people doing the native implementation? What would happen with your 32-bit register on a 16-bit machine? Or a machine with 36-bit words? or 64-bit little endian machine? Or trinary logic? Or some thing that we can't even imagine yet but that's commonplace in 2030?
added on the 2011-10-03 10:54:58 by Preacher Preacher
BTW, there's an AS3 version at http://entropedia.co.uk/generative_music/ that allows you to modify the formula while playing.
A little ditty which sounds a little like Frere Jacques (Mester Jacob): (t>>7|t*3|t>>(t>>15))*10+((t>>8)&5)
This one sounds like it has a high-pass-filted delay which is an octave or 2 higher than the original melody: (t>>9|t*3|t>>(t>>8))+((t>>7)&15)*8
(those two were done in the as3 player btw)
loving the as3 player heheh
added on the 2011-10-03 13:32:27 by frenzy frenzy
By popular demand I made a 4k version of the 128 B VCS implementation:
genmusic1-4k.bin. Source code etc. at genmusic1

I also implemented (t>>7|t|t>>6)*10+4*(t&t>>13|t>>6) as genmusic2.bin (or genmusic2-4k.bin). Similarly, source code at genmusic2. I had to hack this one a bit to fit, placing some code in the reset vector area.
added on the 2011-10-03 13:50:08 by Tjoppen Tjoppen
here is an "arabic-noisy" one:
t*4+t*(12*cos(t>>10&t>>12)%1)+t*(12*cos(t>>10&t>> ;12)%1)+t*(12*cos(t>>12+t))

that online music generation is dope :D
added on the 2011-10-03 14:07:13 by rez rez
rez: funny
added on the 2011-10-03 15:19:38 by rudi rudi
hey, this is fun! t*((t>>10)^42) :)
added on the 2011-10-03 15:26:09 by kusma kusma
added on the 2011-10-03 15:31:06 by kusma kusma
@rez the arabic one is fantastic, especially after 30 mn of listening to experimental glitch noise

A soundtrack for some robots walking in some massive parallax scroller...
(((t*13)^(t*17)) >> 8)|(t >> 5)*(t >> 3)
t/31337*t
obviously my best attempt sofar
added on the 2011-10-03 16:12:23 by Maali Maali
And now, the 'Lemmings March' ^^
(t>>5)|(t<<4)|((t&1023)^1981)|((t-67)>>4)
and another one:
((t>>4&t>>3|t<<8)^(t<<8))|((t%2==0)?t*2:t*8)+(t>& gt;10)*(((t+2)%2==0)?t*6:(((t+4)%2==0)?t*8:t*4))

still trying to get something "musical" but not succeed yet :D
added on the 2011-10-03 17:28:43 by rez rez
added on the 2011-10-03 17:37:14 by kusma kusma
@marmakoide: That Lemming march is awesome, could definitely be used as a basis sample for something else.
@Garga He he, thanks ^^ That seems to be the challenge for 'one-liner music'. Getting a good enough loop is not too hard, play & tweak. But then, trying a melody on top of that texture, can't touch this (tuuudududum). Yet.
added on the 2011-10-03 18:19:23 by r0XX0r r0XX0r
copy-pasta seems to be needed for url 2 for some reason.
added on the 2011-10-03 18:22:20 by r0XX0r r0XX0r

login