# pouët.net

Go to bottom

## Experimental music from very short C programs

category: code [glöplog]
Glitchcore!
99*(sin(0.0002*t)+cos(0.0002*t)+tan(0.0002*t))*sin((0.002-(t)*.0002*0.0005*t)* t)
sin/cos/floats are no valid micro-music functions.
:)

:O

Approximations?
How do you do that?
taylor series approximation for example.
or polynomial approximation, cordic ...

a good site dealing with dsp: musicdsp.org ... but I guess you already know this one ...

t*sin(12^2>>5)*tan(12*t>>16)
pure IDM o/
t*sin(12^2>>5)*tan(12*t>>16)^24 this sounds a bit like a black metal intro :>
</spam>
Sin() isn't kosher, people!

(t>>6|t|t>>(t>>16))*10+((t>>11)&7)
So here's a beat, anyone want to add a solo instrument on top of this? ;)

((t&4096)?((t*tan(t)|(t/16))>>1):(t>>3)|((t&8192)?t<< ;2:t))
aaaawouldyou..fucking..#@!.. drop the semicolon in front of the number 2 and it'll work.
Combined xpansive's and varjohukka's stuff

(t>>7|t|t>>6)*10+4*(t&t>>13|t>>6)
Nice! This is way to addictive (I'm at work).

A variation on skunk's beat. I'd never come up with it on my own, I just played with your code, hope you don't mind!

((t&8192)?((t&3072)?((t*tan(t)|(t/6))>>1):(t>>3)|((t&6 144)?t<< 3:t)):((t&4096)?((t*tan(t)|(t/16))>>1):(t>>3)|((t&8192)?t <<3:t)))
Sorry, I meant skurk! Sorry!!
I have to stop now, before it's too late.

((t&1024)?t*(((t&0x1ffff)>=0x7fff)?(((t&0x1ffff)>=0xffff)?(( (t&0x1ffff)>0x17fff)?1.5:1.2):1.75):2):0)|((t&4096)?t*tan(t)|((t-819)/ 16):0)|((t>0x1ffff)&&(t&8192)?((t&512)?(t<<4)*(((t&0 x1ffff)>0x7fff)?(((t&0x1ffff)>0xffff)?2.0:2.25):2.0):0):0)

pastebin: http://pastebin.com/ieGksZ8L

Quote:
((t&4096)?((t*tan(t)|(t/16))>>1):(t>>3)|((t&8192)?t<<2 :t))

Similar, but without tan(): ((t&4096)?((t*(t^t%255)|(t>>4))>>1):(t>>3)|((t&8192)?t <<2:t))
Not sure if the ^ is interpreted as a bitwise xor though...
Very impressive! Sounds a little bit like the game Street Surfer I think.
Now would it be possible to synthesize phonemes? That song needs vocals ;)
Possible, yes. But not quite "one line" or even "short" probably... ;)
here's a simple bass line modified from the one viznut pasted last:
(t*2>>5|t*2|t*2>>4)*((t>>14)&1)+(t>>5|t|t>>4 )*(((t>>14)^1)&1)
This was FUN! Here's something that sounds like a SID:

((t>=0xffff)?(((t&1024)?((t&64)?127:0):0)):0)|(((t*((t^t%255)&3 4))|t)>>14)|((t>=0x1ffff)?(t>>4):0)

pastebin: http://pastebin.com/NJsRbAVA Fanfare?

(((t&8192)?((t&4096)?((t&1024)?t*2:t*4):((t&512)?t*4:t*4.2)):( (t&4096)?((t&1024)?t*2:t*10):((t&512)?t*2:t*8))>>2)*(( t&16384 )?3:2))|t*(( t&16384 )?1/8:1/(.01*t))
Combination:
((t&4096)?((t*(t^t%255)|(t>>4))>>1):(t>>3)|((t&8192) ?t <<2:t)) ^ ((((t&8192)?((t&4096)?((t&1024)?t*2:t*4):((t&512)?t*4:t*4.2)):( (t&4096)?((t&1024)?t*2:t*10):((t&512)?t*2:t*8))>>2)*(( t&16384 )?3:2))|t*(( t&16384 )?1/8:1/(.01*t))>>1)
Charming :)
raer you just blew my mind
or ears... ;)