By the way, you can test these under any system that supports MPlayer and pipes (such as Cygwin or AROS) with: prog | mplayer - -demuxer rawaudio -rawaudio rate=8000:channels=1:samplesize=1
@Veqtor They're ternary operators. (x ? y : z) is y when x is truthy (evaluates to true), or z when x is falsy (evaluates to false). The one-liners site actually uses Javascript under the hood, so you're probably running into something where javascript and C disagree on truthiness.
If anyone wants to try these out on a system with ALSA sound drivers, you can pipe the output in to aplay (which defaults to the right format, 8 bit 8 KHz):
@shaurz Do you know how exactly to use arecord to output this to a soundfile usable by mixing programs? Something along the lines of wav, mp3, flac ... hell, even ogg would work.
That records about 12 seconds, change the "100K" number to change the recording length. Other programs that encode mp3, flac, etc. probably have the same ability to record raw PCM data.
These are amazing! How did you find them? did you figure out that certain portions of the equation produce certain portions of results (bass blurts, rhytmic drum-like-sounds, etc), or is it total trial-and-error?
@yorgle In the first video it was still mostly trial-and-error, but many songs in this one are combined from several smaller pieces. For example, in the piece seen in the screenshot I chose two short, good-sounding formulas and tied them together. Sometimes, constants can be replaced with slowly changing functions to create macrostructure. However, I think there's still a lot of surprises in the possibility space that are most likely to be found by accident than by deterministic means.
My Arduino just got a new gig!
Jianju69 1 week ago
yeah, great cover of the new Skrillex album. love it!!!
mdfreezer 1 week ago
t*((t>>(t>>(2000-t)))&(24)&t>>((2*(2))*t))
jarblewarble 3 weeks ago
That is an "impossible" video. =p
alenblake38g 1 month ago
This video is a favorite on Mogadishu
giftbasketer2 1 month ago
@giftbasketer2 Is experimental electronic music popular in Somalia?
jarblewarble 1 month ago
1:09 is my favorite.
karlkid333 2 months ago
Cool!!!!!
mryndack 2 months ago in playlist Favorite videos
Who knew math could make good music.
mushu5t 3 months ago
@mushu5t Who knew that math could make good music? Pretty much every electronic musician.
PrivateBuckwheat 2 months ago
Here's another great one: (t>>4*t) + (t>>100*t)
jarblewarble 3 months ago
This one is really strange (and a bit scary): ((t^t*1000)%t)*sin(t/10000000)
jarblewarble 3 months ago
this got me all excited for some reason
homelessninja 3 months ago
This is actually funky morse code.
Youtub3rh4x0r 3 months ago
why are there so many tits boots in the recommended videos ?
entres 3 months ago 2
This has been flagged as spam show
nothing new about algorithmic music. tones.wolfram.com
prettyhotprogrammer 3 months ago
not really music at all, but I like t*t>>(Math.sqrt(t)&50)*0.2
k4ur0 3 months ago
t*t>>1+(t>>9|2)+(t>>10)*t
vapgames 3 months ago in playlist Другие видео от пользователя viznut
Holly shit :) That's amazing! Chaos theory, at it's best :) I liked the "Lost in space", my favorite :)
DoubleM55 3 months ago
For a more serious algorithmic approach to music you should watch outube.com/watch?v=po9JH2UKGY0
stefandxm 3 months ago
Wow, extremely cool!
themooninsilvertrees 3 months ago
Comment removed
dorgenviecj 4 months ago
I never thought we could make music with one line :)
minoces 4 months ago
This has been flagged as spam show
3:10 Love !!
TurtleTraces 4 months ago
3:10 Love !!
TurtleTraces 4 months ago
The third one, by red-, sounds like something I'd hear at an Industrial club!
punkminkis 4 months ago 5
The last one was truly amazing!
cogbob 4 months ago
2:15 WHAT. MIND BLOWN
beefinator14 4 months ago in playlist More videos from viznut
here's an uplift : t * (t>>-1|t>>10)/5
Dea7h 4 months ago
(t>>8|t|t>>(t>>4))*7+((t>>4)&4) WOAH DUDE
atalasfarted 4 months ago
I especially like the one that goes "BEEP BEEP BOOP BEEP BOOP BEEEP"
The one that goes "BEEP BOOP BEEP BEEP BEEP BOOP" is terrible, however.
LaenPvP 4 months ago 41
Comment removed
LymeeHugs 4 months ago
I remember a C64 game called Wizball that had similar sounds from time to time, some sort of series of sweeping noises =)
Trinnexx 4 months ago
Can this be "pump through" a vocaloid-3 output? :)
jci10 4 months ago
42's across the board... Makes for an eerie melody...
bitly link oqag1p
(giving me errors if I try and post any code or URL, wtf)
nobrayn 4 months ago
Comment removed
nobrayn 4 months ago
Wow the one by red- is Aphex Twin like... awesome work guys :)
88xetrov88 4 months ago
love the one at 2:14!!
ZOMGxuan 4 months ago
I cheated a bit and added variable v to retain some state between samples:
0;};var v=0;f=function(t){return v=v+!((t>>8)&18),((v*v)|(t>>8+t>>9)*100)+(v>>7);
The 18 at the beginning can be modified to get a different rhythm (e.g. try 132 for some extra macro structure).
kaviolalainen 4 months ago
((t>>2*t>>3)|(t>>4))|((t/4>>8)|(2%t>>3))+cos(t)
knorsa 4 months ago
This is why the demoscene means something to me.
dixansk 4 months ago
WINTERNET
0x1392 4 months ago
((t>>cos(t)>>6.2)<<t*300)+tan(t)/(t&7<<t)
lynxfoxx 4 months ago
(t>>(((t^t)>>(t^t)^t)>>2)>>3)^t
muhtimin 4 months ago
By the way, you can test these under any system that supports MPlayer and pipes (such as Cygwin or AROS) with: prog | mplayer - -demuxer rawaudio -rawaudio rate=8000:channels=1:samplesize=1
Bisqwit 4 months ago
wow those are even better than the ones in the first vid. hope there'll be more!
irrlichtproject 4 months ago
Pure genious !
norecess464 4 months ago
In the skurk example, what are the ? and : operators? I can't seem to get them to work at the one-liners site.
Veqtor 4 months ago
@Veqtor They're ternary operators. (x ? y : z) is y when x is truthy (evaluates to true), or z when x is falsy (evaluates to false). The one-liners site actually uses Javascript under the hood, so you're probably running into something where javascript and C disagree on truthiness.
psychedelicsquid1990 4 months ago
If anyone wants to try these out on a system with ALSA sound drivers, you can pipe the output in to aplay (which defaults to the right format, 8 bit 8 KHz):
./program | aplay
shaurz 4 months ago
@shaurz Do you know how exactly to use arecord to output this to a soundfile usable by mixing programs? Something along the lines of wav, mp3, flac ... hell, even ogg would work.
Cheers.
Chad48309 3 months ago
@Chad48309 You don't need to use arecord, you could do something like this:
./program | head -c 100K | oggenc --raw --raw-bits=8 --raw-chan=1 --raw-rate=8000 -o music.ogg -
That records about 12 seconds, change the "100K" number to change the recording length. Other programs that encode mp3, flac, etc. probably have the same ability to record raw PCM data.
shaurz 3 months ago
@shaurz Thanks very much, mate.
Chad48309 3 months ago
@Chad48309 No problem, here's the command for FLAC (replace the oggenc command):
flac --force-raw-format --channels=1 --bps=8 --sample-rate=8000 --sign=signed --endian=big -o music.flac -
shaurz 3 months ago 3
this is awesome....so much depth to these simple bit-manipulating logic formulas!
ericfontainejazz 4 months ago
This has been flagged as spam show
I love this SO MUCH!!!
DragonL 4 months ago
I love this SO MUCH!!!
DragonL 4 months ago
These are amazing! How did you find them? did you figure out that certain portions of the equation produce certain portions of results (bass blurts, rhytmic drum-like-sounds, etc), or is it total trial-and-error?
yorgle 4 months ago 5
@yorgle In the first video it was still mostly trial-and-error, but many songs in this one are combined from several smaller pieces. For example, in the piece seen in the screenshot I chose two short, good-sounding formulas and tied them together. Sometimes, constants can be replaced with slowly changing functions to create macrostructure. However, I think there's still a lot of surprises in the possibility space that are most likely to be found by accident than by deterministic means.
viznut 4 months ago 12
@viznut Awesome!
yorgle 4 months ago