pouët.net

Go to bottom

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!
added on the 2013-11-17 15:35:35 by Qqwy Qqwy
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

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
added on the 2014-03-06 02:40:20 by clone45 clone45
yay! my favorite thread is still alive :)
added on the 2014-03-06 09:35:13 by musk musk
Most likely already done, as it is a tiny one. Drunken/glitch/psychedelic, 8khz:

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?).
added on the 2014-03-08 03:15:24 by sd sd
Very nice, mu6k!
added on the 2014-03-09 07:12:12 by clone45 clone45
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 !
added on the 2014-03-10 21:59:21 by Pyrofoux Pyrofoux
And this one. Which is sad, I think.
t%(t/11)+t%(t/7)+42
added on the 2014-03-10 22:06:48 by Pyrofoux Pyrofoux
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
added on the 2014-03-11 06:34:56 by sd sd
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.
added on the 2014-03-11 07:33:09 by sd sd
ALERT !
(t>>5)&t%110
added on the 2014-03-13 22:29:14 by Pyrofoux Pyrofoux
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
added on the 2014-04-02 14:23:18 by Qqwy Qqwy
O_O wow
WAT?! °o°
added on the 2014-04-02 14:53:04 by xTr1m xTr1m
^_^ If anyone has any questions about how I accomplished that demo, feel free to ask me questions by the way.
added on the 2014-04-03 02:16:19 by Qqwy Qqwy
Nice one!
added on the 2014-04-03 03:15:27 by ham ham
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)
added on the 2014-04-03 10:13:03 by Qqwy Qqwy
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
added on the 2014-04-05 02:58:16 by Mandrakas Mandrakas
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
added on the 2014-04-06 15:37:16 by Qqwy 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.
added on the 2014-04-13 04:07:14 by cyskus cyskus
@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!
added on the 2014-04-16 12:18:41 by Qqwy Qqwy
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
added on the 2014-04-18 02:21:05 by clone45 clone45

login

Go to top