pouët.net

Experimental music from very short C programs

category: code [glöplog]
Mine can be optimized to t&t>>13|t>>6

Funny how I didn't realize that before...

If you want to actually combine the two parts you can do this:
((t*(t>>8|t>>9)&46&t>>8)) ^ (t&t>>13|t>>6)

& is decent too
>> reminds me of traverse de rn85 (dubmood)
whoops I meant << for the last part
After a bit of trial&error: (t*3<<0|t>>2|t>>6)*30&((t*7<<-1|t>>-2|t>> ;12)*4)

Would pass as an semi-decent start actually :)
does <<0 make sense?
Shift to left, 0 bit?

And I don't get the semicolon in front of the 12.

What "language" is this actually? I wanted to understand clearly, what we are doing here exactly and found out, that I don't know it :)
; is a typo, isn't supposed to be there.
And just try changing that zero.
As I said, This was mostly trial & error, so I didn't really optimize it :)
Uhm: ((t%40000)<5000) ???
It's C, not Java. Would you like -(t%40000-5000>>31) instead?
Duh I was missing a zero when I was interpreting what the code meant. I was reading %4000, and not 40000. Ooops.
I find this very interesting and entertaining, however I lack programming knowledge and I'm not understanding exactly what I am doing here:

t>>40&t<<2&90

It's probably some basic math with C...any idea where I could read into it and hopefully refresh my math skills on the way? :)
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B

this might be bettwer http://en.wikipedia.org/wiki/Bitwise_operation. so learn it.
however, you should have a basic understanding of binary-decimal relationships.
Thanks for the links! I'll read into it. Yes, I think I have a basic understandig of binary-decimal relationship but I never really dug into logical operators. I probably have to write down bits and draw a graph to understand what happens :) Will try that tonight.
Awesome job dudes and dudettes!
You can use IQ's graph toy for visualizing the data - e.g.

f1(x) = ((x*(x>>8|x>>9)&46&x>>8)) ^ (x&x>>13|x>>6)

http://www.iquilezles.org/apps/graphtoy/
thx.
I understood the bitwise operations, but I couldn't get behind, why they make sense in a equation. But if you see it visual, it makes sense... thanks :)
(t*50)*10*(sin(t*0.0001))^2
wob wob wob!
haha :)

c64 drumloop...sorta

((t>>7|t<<sin(t)|t>>6)*10)+45
FeN: in boolean algebra there are actually symbols for logic-operations like this. so, its an own branch. for example the XOR operator has its own symbol (actually there are two). But the one I use to describe in some of my formulas for a random number generator i use Simpson's xor-symbol: (+).
Nice one Varjohukka =]
Not C...
some 4 bit PCM madness ... http://pouet.net/prod.php?which=57826

more javascript hackery
(((j=Math.round(t/1500)%16))%8==1|(j==3)|(j==6)) * sin(200-200*Math.sqrt((t%6000)/6000))*50 + Math.random()*40*(j%8==5) + (((t|(t>>9|t>>7))*t&(t>>11|t>>9) )&63)*(j%3==0)
Well, that set the bar high!

Now I somehow expect a generic dubstep equation in 3...2...1...
sin(t/1000)*2000+2000+sin(t/800)*1800+2300+sin(t/1200)*2000+2100+(Math.random()* t&40)

Trying to do dubstep but it sounds more like a motorcycle
Okay here's some random dubstep (changes every time you refresh I think):

r=typeof r=='undefined'?Math.random()*400+1800:r,sin(t/(r/1.5))*r+r+sin(t/(r/1. 7-200))*(r-200)+(r+200)+sin(t/(r/1.4+200))*2000+(r+100)+(Math.random()*(Math.pow( sin(t/2000),40)*400))+(Math.random()/3*(Math.pow(sin(t/4000),200)*200))