3 ms·
And here is a "Piano Phase" written in C with no libraries that fits in an (old-style, 140 character) tweet: main(){int l=999,i,j;int v[]={133,119,89,80,75,119
by jkarni 6y ago
And here is a "Piano Phase" written in C with no libraries that fits in an (old-style, 140 character) tweet:
main(){int l=999,i,j;int v[]={133,119,89,80,75,119,113,80,89,119,75,80};for(;;){putchar(250*(j++%v[i%12]&&(j+i)%v[i%12]==0));i+=(j%l)==0;}}
Just compile and run that with "a.out | aplay".
It's been a while since I wrote this, and I remeber cheating a bit somewhere, but not surprisingly I can't figure out what it's doing much less how it's cheating.
- Rochus 6y agothat's funny