Experimental music from very short C programs
category: code [glöplog]
@mu6k: Don't worry, everyone has their drunk or wharblgarbl moments. I do wonder though, if you're still up to answering some questions with your amazing Bytebeat and Demoscene knowledge (Saw your Nyan Cat demo on Shadertoy the other day).
I am right now, amongst other things, thinking about the possibility of a short bytebeat algorithm that will make something that sounds like bird sounds. Maybe you have some ideas about that?
Also, very interested to see what you're going to make. Keep us posted!
I am right now, amongst other things, thinking about the possibility of a short bytebeat algorithm that will make something that sounds like bird sounds. Maybe you have some ideas about that?
Also, very interested to see what you're going to make. Keep us posted!
Here's a fun one. I call it "robot babpipes"
http://wurstcaptures.untergrund.net/music/?oneliner=((((t%26%26t)%3E%3E3)*((14274%25(t%26%26(t%3E%3E(78-((t%3E%3E15)%253)))))%7C%7Ct%26t))%26335)%3C%3C1&oneliner2=&t0=0&tmod=0&duration=30&separation=100&rate=44100]((((t&&t)>>3)*((14274%(t&&(t>>(78-((t>>15)%3)))))||t&t))&335)<<1
http://wurstcaptures.untergrund.net/music/?oneliner=((((t%26%26t)%3E%3E3)*((14274%25(t%26%26(t%3E%3E(78-((t%3E%3E15)%253)))))%7C%7Ct%26t))%26335)%3C%3C1&oneliner2=&t0=0&tmod=0&duration=30&separation=100&rate=44100]((((t&&t)>>3)*((14274%(t&&(t>>(78-((t>>15)%3)))))||t&t))&335)<<1
combining multiple channels into a single channel can be achieved while maintaining complete control over the volume for each channel. You must first cast to unsigned char then do a simple linear interpolation channel*scale + channel*(1-scale). It works so long as the scaling factors add to 1.
In this example 3/4 + 1/4 = 4/4 = 1
Has multiple uses such as phasing in and out over time, volume control, moving from one melody to another, etc
In this example 3/4 + 1/4 = 4/4 = 1
Code:
unsigned char c1 = channel1;
unsigned char c2 = channel2;
mzk[ i ] = c1*3/4 + c2*1/4;
Has multiple uses such as phasing in and out over time, volume control, moving from one melody to another, etc
and a proper example combining some byte beats from various sources.
Code:
int f = t*3/4;
unsigned char c1 = ( ( ( f*( t>>8 | f>>9 ) & 46 & f>>8 ) )^( f & f>>13 | f>>6 ) );
unsigned char c2 = ( ( ( f & 4096 )?( ( f*( f^f%255 ) | ( f>>4 ) )>>1 ):( f>>3 ) | ( ( f & 8192 )?f<<2:f ) ) );
unsigned char c3 = 3*f & ( f>>8 );
pcm[ i ] = c1*1/3 + c2*1/3 + c3*1/3;
I have a challenge/request: Is it possible to make a bouncing-ball sound using bytebeat? Meaning, something with a rhythm similar to: http://www.youtube.com/watch?v=e0B_bBwld3k
yay! my favorite thread is still alive :)
@clone45: Something like this?
m=0x7fff,f=[3,4,2,6][(t/m)&3],t=t&m,e=t*.002,e=e*e,e=0xff-(e&0xff),e/=(255.0+t*.1),(sin(t*.05*f))*e*127
m=0x7fff,f=[3,4,2,6][(t/m)&3],t=t&m,e=t*.002,e=e*e,e=0xff-(e&0xff),e/=(255.0+t*.1),(sin(t*.05*f))*e*127
Most likely already done, as it is a tiny one. Drunken/glitch/psychedelic, 8khz:
It's the usual sierpinski triangle - t*t>>n, with r* gain/state fast-forward. 1984 makes the intro/bass sounds smooth and tune is less clipped overall. The div non-linearity introduces some funky glitches too. It can be anything in 1500-3000 range, the sound changes only slightly.
Use C playback (or render), js sounds even more crap for some reason (rounding errors?).
Code:
echo "main(int t){while(++t) putchar(t*(t&t>>11)/1984);}" \
| gcc -x c - -o glitch && ./glitch | ffplay -f u8 -ac 1 -ar 8000 -i -
It's the usual sierpinski triangle - t*t>>n, with r* gain/state fast-forward. 1984 makes the intro/bass sounds smooth and tune is less clipped overall. The div non-linearity introduces some funky glitches too. It can be anything in 1500-3000 range, the sound changes only slightly.
Use C playback (or render), js sounds even more crap for some reason (rounding errors?).
Very nice, mu6k!
This is the first "music" I'm sharing.
t%(t/11)+t%(t/7)+42
I have read a lot of your posts, and today I choose to participate with you guys !
t%(t/11)+t%(t/7)+42
I have read a lot of your posts, and today I choose to participate with you guys !
And this one. Which is sad, I think.
t%(t/11)+t%(t/7)+42
t%(t/11)+t%(t/7)+42
Quote:
And this one. Which is sad, I think.
t%(t/11)+t%(t/7)+42
Too abstract to get too depressed over (the links are same?)
some bawww 3-op disharmony:
((t<<8)&t)/20
Almost forgot, t&t<<8/x is quite interesting, for example (t&t<<8)/3 is completely another song (though mostly annoying high pitch), with weird semblance of drums in distance. Try different bitshifts too.
ALERT !
(t>>5)&t%110
(t>>5)&t%110
We must not let this topic go to waste! ;D
Game of thrones: Dance of Dragons is my submission to the JS1K contest: http://js1k.com/2014-dragons/demo/1953
It features a bytebeat (or actually floatbeat) synthesizer that plays the whole opening from the Game of Thrones TV-series.
There's also a color-changing visualizer inside the 1024 bytes.
I hope you guys like it. In the 'details' tab, there's more information, includinig the non-minified source with comments detailing what I did and how.
~Qqwy
Game of thrones: Dance of Dragons is my submission to the JS1K contest: http://js1k.com/2014-dragons/demo/1953
It features a bytebeat (or actually floatbeat) synthesizer that plays the whole opening from the Game of Thrones TV-series.
There's also a color-changing visualizer inside the 1024 bytes.
I hope you guys like it. In the 'details' tab, there's more information, includinig the non-minified source with comments detailing what I did and how.
~Qqwy
O_O wow
WAT?! °o°
^_^ If anyone has any questions about how I accomplished that demo, feel free to ask me questions by the way.
Nice one!
I also made a Prod entry for it, just for the sake of it: [https://www.pouet.net/prod.php?which=62888]. Feel free to vote on it and all that good stuff :).
(NOTE: The JS1K contest's places are not yet decided, as the jury is still busy with scoring them)
(NOTE: The JS1K contest's places are not yet decided, as the jury is still busy with scoring them)
First post newbie here!
Im totally adicted with the bytebeat and impressed with your achievements.
I have been trying to implement an Lorenz Attractor here:
http://greggman.com/downloads/examples/html5bytebeat/html5bytebeat.html
But I get lost at the 1h mark, however I think we all want to know how does it sound, isn´t?. And the final tweaking has to be so f7kng fun!
It should be a question of 10-20 mins of some with your coding level...
Finally one hiper technical, better than SID piece
Im totally adicted with the bytebeat and impressed with your achievements.
I have been trying to implement an Lorenz Attractor here:
http://greggman.com/downloads/examples/html5bytebeat/html5bytebeat.html
But I get lost at the 1h mark, however I think we all want to know how does it sound, isn´t?. And the final tweaking has to be so f7kng fun!
It should be a question of 10-20 mins of some with your coding level...
Finally one hiper technical, better than SID piece
Hello Mandrakas,
Thank you for your reply, and great to find someone else who is also very interested in Bytebeat.
Implementing a Lorenz Attractor seems interesting. However, how do you exactly want to map the different values of a Lorenz System to sound?(as it consists, as far as I know, of three different equations that make a graph in 3d space)
The link you posted to Greggman's great html5bytebeat environment sadly does not have the part after the # in there, so I can't see what you've made.
And thanks for putting a link to my Super Hexagon cover in here as well. I'm glad you like it. It is slightly older and can probably be optimized a whole lot. It actually isn't thát technical, but I never got around to writing a nice in-depth guide of what was going on.
I might still do that sometime soon, since I now have multiple demo's that work great.
If you have any other questions, or specific problems, feel free to ask ^_^.
~Qqwy
Thank you for your reply, and great to find someone else who is also very interested in Bytebeat.
Implementing a Lorenz Attractor seems interesting. However, how do you exactly want to map the different values of a Lorenz System to sound?(as it consists, as far as I know, of three different equations that make a graph in 3d space)
The link you posted to Greggman's great html5bytebeat environment sadly does not have the part after the # in there, so I can't see what you've made.
And thanks for putting a link to my Super Hexagon cover in here as well. I'm glad you like it. It is slightly older and can probably be optimized a whole lot. It actually isn't thát technical, but I never got around to writing a nice in-depth guide of what was going on.
I might still do that sometime soon, since I now have multiple demo's that work great.
If you have any other questions, or specific problems, feel free to ask ^_^.
~Qqwy
Here's a compilation of a few of the (extremely simplistic) experiments I did over the course of a few hours on this topic about a year ago: MIX8.c. The code is golfed, so it might be difficult to understand (ungolfed: MIX8.c). When run, it outputs to either a file named MIX8 or to a file specified as a command line parameter.
@cyskus: I'll try out those interesting-looking examples as soon as I have access to a decent workstation again. Looks great!
I also wanted to tell everyone of the things I did these past few weeks:
-JS1K Submission: Game of Thrones Theme (It got the 8th place!)
-Please Exist, a song from the game Knytt Underground (original version by Nifflas) (Low-Quality version)
-Predestined Fate, a song from the game VVVVVV (original version by Souleye) (Low-Quality version)
It seems that they got a little interest over at the Social Media thingies. Hooray!
I also wanted to tell everyone of the things I did these past few weeks:
-JS1K Submission: Game of Thrones Theme (It got the 8th place!)
-Please Exist, a song from the game Knytt Underground (original version by Nifflas) (Low-Quality version)
-Predestined Fate, a song from the game VVVVVV (original version by Souleye) (Low-Quality version)
It seems that they got a little interest over at the Social Media thingies. Hooray!
Hi everyone,
If anyone would be interested, I'm running a bytebeat contest: http://www.microbemodular.com/bytebeat-contest/
I invite you all to enter! It's partially to support my new Bytebeat based eurorack module that should be released soon. ^-^
1st prize: $250.00
Contest ends: May 10th, 2014
Please see the full rules on the site.
Cheers,
Bret
If anyone would be interested, I'm running a bytebeat contest: http://www.microbemodular.com/bytebeat-contest/
I invite you all to enter! It's partially to support my new Bytebeat based eurorack module that should be released soon. ^-^
1st prize: $250.00
Contest ends: May 10th, 2014
Please see the full rules on the site.
Cheers,
Bret