pouët.net

Go to bottom

Experimental music from very short C programs

category: code [glöplog]
http://www.youtube.com/watch?v=NPD9zCOpmuc
Oh I forgot you need bbcode and unicode.
added on the 2012-03-04 01:55:53 by nitro2k01 nitro2k01
Info: you guys made it to the magazine of the TU Eindhoven's computer science & math study association.

Not that that's much of a feat, but it does mean that real paper mags are writing about this! :-)
added on the 2012-03-04 17:38:22 by skrebbel skrebbel
@skrebbel
Is there a copy of the publication online somewhere?
added on the 2012-03-04 22:06:33 by xpansive xpansive
Haven't read all 22 pages, but just wanna say this is GENIUS!!
added on the 2012-03-19 21:33:44 by djh0ffman djh0ffman
mu6k, cool! you made that one?

xpansive, not sure, i think not.
added on the 2012-05-10 22:37:57 by skrebbel skrebbel
For those who happen to own an iphone/ipad or similar, I made an app that uses this synthesis method, to play around in real-time, with 3d scope visuals. I think you'll like it.
It's called BitWiz Audio Synth. Demo vid and info here: http://kymatica.com/bitwiz
added on the 2012-05-28 18:58:52 by kymatica kymatica
yay $2.99!
added on the 2012-05-28 22:12:56 by trc_wm trc_wm
L: x=t*0.1,(t<1)?(s=1/8,f=1<<16):0,(t%f)==0?(s=s*[3/2,2/3,4/3,3/4,5/4,4/5,6/5,5/6][(x^(x>>3))&7],e=1,f=1<<(14+sin(x*99)*2)):e*=0.9999,s>0.25?s*=0.5:s<0.02?s*=2:0,sin(sin(t*s)*e*9)*e*127; | R: sin(sin(t*s/2)*e*16)*e*127

Next note is generated based on previous note after a random waiting time.
Envelope is multiplied by 0.9999 every sample. It will approach 0. Resets on new note.
Frequency and envelope is used to generate a simple FMish sound using the sine function.

Increase time if you want to hear more awkwardly generated notes.
added on the 2012-07-09 22:20:22 by musk musk
Hi volks!

I use this formula to generate a chromatic scale (8000 Hz):

t * Math.pow (2.0, (((t>>11)%13)+20) / 12.0)
t * Math.pow (2.0, (((t>>11)%13)+20) / 12.0)

Q: Can that be optimized to get rid of pow or floating point completely?
I'm new to sound and don't know any tricks yet...
added on the 2012-10-21 17:11:07 by pinsel pinsel
@pinsel: I'm pretty sure there isn't a way for getting rid of pow / floating point for chromatic scales (besides using tables of course).
added on the 2012-10-21 19:08:13 by Kabuto Kabuto
Tried a little and must agree: That was a really silly question.
All approximizations sounded terrible :)
added on the 2012-10-21 19:10:05 by pinsel pinsel
If you adopt just intonation (where notes are related by small integer ratios) instead of equal temperament (where everything is a 12th root of two) then you can avoid the Math.pow. Not sure how you'd make a full musical scale out of it without using tables, though...

(My 131-byte rickroll has an easily visible table of ratios in it)
added on the 2012-10-21 19:42:00 by gasman gasman
I'll look at that. Maybe Intonation is what i've used here without knowing any background. Real Fun!

L: u=((t+0x3900)&0x2fff),(u*((u>>8)&4)*(((u>>13)&3)+((u>>10)&3))>>1) | R: u=(t+0x100)&0x3000?(-t+0x2700):(t+0x2700),u*((u>>7)&4)*(((u>>13)&3)+((u>>10)&3))>>1

"Fanfare Of The Happy Muncher"
added on the 2012-10-21 20:38:38 by pinsel pinsel
nice reverb or whatever that is @pinsel. ;)
added on the 2012-10-21 20:48:12 by yumeji yumeji
"Just intonation" not just "intonation". (Thank ghawd for quotation marks. ;) ) "Just" is an adjective modifying "intonation".
And yes, unless you use some really weird tricks, (or floating point) you will have used just intonation by default. Every frequency you create will typically by an integer division of the sample rate, so as an effect of that, any two frequencies will also be an integer ratio of each other. And chances are that if you've found meaningful intervals, that they are simple ratios like 3/2 or 5/4 of each other.
added on the 2012-10-23 04:00:07 by nitro2k01 nitro2k01
Thx, i tried Just Intonation, but it limits creativity - reminds me on playing flagolets on guitar, which i never liked for that reason. approximating the curve with some spline method should work, but it's neither faster nor less code, so i'll keep using a table for my usecase. What i really want is generating procedural music for a small mobile game, and the ideas presented here are very inspiring. I dream of some kind of music, that changes during playng the game, and also reacts to the actions of the player, so you feel like creating some music yourself while playing. If someone of you guys knows another source of inspiration, pls let me know :)
added on the 2012-10-23 14:57:17 by pinsel pinsel
You're searching for algorithmic composition, there's lots of research done in that respect by Albert Gräf and Clarence Barlow. With that information and the help of google you could spend many hours reading interesting stuff.
added on the 2012-10-23 15:55:41 by xTr1m xTr1m
TY for the names, add "Joseph Schillinger" to the researcher list.
added on the 2012-10-23 16:47:57 by Inertia Inertia
No idea what I'm doing, but I modified and mixed up a bit from xpansive (2012-02-25 23:08:57) and yumeji (2011-10-04 17:54:07):

L: t>>4|(t>>9|(t>>13)&3)|t>>5^t | R: t%(t/(t>>9|t>>13))^t
All right. Today I made my first real Bytebeat creation:

Für Elise
It features a repeating pattern, a sine wave synth and an envelope, using techniques I picked up from some examples much earlier in this topic. I'm quite pleased with it. Right now it is 244b(not counting comments, spaces and newlines), but of course, it should be trivial to minify this much further since much of the pattern is repeated.
added on the 2013-09-27 23:41:15 by Qqwy Qqwy
clone45: good job! I love the crazy high-pitched pulse waves. And of course the acid sqrt bass always works.


Today I went ahead and implemented a Low-Pass Filter using Floatbeat.

It's a work-in-progress though, since I don't yet know how to do Amplitude-Rescaling. (the sound now quickly becomes inaudible when increasing the effect).

Also made the High-pass variant, by the way.
added on the 2013-10-14 22:07:29 by Qqwy Qqwy

login

Go to top