transform logic to sound? hmm interesting idea
Generate raw WAV output by hooking malloc and read
11–20 of 26 posts
Re: Generate raw WAV output by hooking malloc and read
#12Actually a decent tune here: https://soundcloud.com/glowdon/jingy-compiler-1#t=6:00
Re: Generate raw WAV output by hooking malloc and read
#13 void* read( int fd, void * data, size_t count)
{
...
gen_square_wave( 44100 , CLAMP(count, 20, 20000 ), CLAMP( sizeof(data), 100 , 1700), 0.7 );
I don't get it, isn't sizeof(data) always the same, and usually either 4 or 8?Re: Generate raw WAV output by hooking malloc and read
#14It was like demos; I would be stunned at the emergent complexity and compactness, and it would only elicit shrugs from friends.
Re: Generate raw WAV output by hooking malloc and read
#15Reminds me of when I was a kid, and I had a Tandy CoCo and a tape recorder deck that was the only way to save any programs you wrote on it. I tried playing the data tape a few times.
Re: Generate raw WAV output by hooking malloc and read
#16void* read( int fd, void * data, size_t count) { ... gen_square_wave( 44100 , CLAMP(count, 20, 20000 ), CLAMP( sizeof(data), 100 , 1700), 0.7 ); I don't get it, isn't sizeof(data) always the same, and usually either 4 or 8?
Re: Generate raw WAV output by hooking malloc and read
#17It sounds like when I piped /dev/random to a midi device. (Or was it /dev/urandom and TiMidity++?) It was like demos; I would be stunned at the emergent complexity and compactness, and it would only elicit shrugs from friends.
main(t){
for(t=0;;t++)
putchar(t*(((t>>12)|(t>>8))&(63&(t>>4))));
//putchar(t>>7|t%45)&(t>>8|t%35)&(t>>11|t%20); // try this too!
}
.. there's a whole world of 1-liners for synthesis out there, and some of them, frankly, are astounding. Sound is such a beautiful way to understand math ..Re: Generate raw WAV output by hooking malloc and read
#18It sounds like when I piped /dev/random to a midi device. (Or was it /dev/urandom and TiMidity++?) It was like demos; I would be stunned at the emergent complexity and compactness, and it would only elicit shrugs from friends.
I'm reminded of some of my favourite C 1-liners for synthesis: main(t){ for(t=0;;t++) putchar(t*(((t>>12)|(t>>8))&(63&(t>>4)))); //putchar(t>>7|t%45)&(t>>8|t%35)&(t>>11|t%20); // try this too! } .. there's a whole world of 1-liners for synthesis out there, and some of them, frankly, are astounding. Sound is such a beautiful way to understand math ..
See viznut's (seminal) intro to the genre.
http://countercomplex.blogspot.fi/2011/10/algorithmic-sympho...
Re: Generate raw WAV output by hooking malloc and read
#19void* read( int fd, void * data, size_t count) { ... gen_square_wave( 44100 , CLAMP(count, 20, 20000 ), CLAMP( sizeof(data), 100 , 1700), 0.7 ); I don't get it, isn't sizeof(data) always the same, and usually either 4 or 8?
Re: Generate raw WAV output by hooking malloc and read
#20void* read( int fd, void * data, size_t count) { ... gen_square_wave( 44100 , CLAMP(count, 20, 20000 ), CLAMP( sizeof(data), 100 , 1700), 0.7 ); I don't get it, isn't sizeof(data) always the same, and usually either 4 or 8?