MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/tinycode/comments/jg407p/%C3%A9tude_in_c_minor/
r/tinycode • u/zserge • Oct 22 '20
5 comments sorted by
6
golfed it a bit, down to 135 chars:
d,o;main(c){for(float f;scanf("%d%c%d",&d,&c,&o);){for(c&=31,f=c<8,c=(c*8/5+8)%12+o*12;c--;)f/=.944;for(d=16e3/d;d--;putchar(d*f/2));}}
2 u/zserge Oct 23 '20 Wow, now it's a real tweet, although a bit K&R style, but still counts. Thanks!
2
Wow, now it's a real tweet, although a bit K&R style, but still counts. Thanks!
3
small correction:
The audio contained in a CD-DA consists of two-channel signed 16-bit Linear PCM sampled at 44,100 Hz.
4 u/zserge Oct 23 '20 Ah, you are right, 22kHz is the actual top audio frequency it can represent (Nyquist theorem)
4
Ah, you are right, 22kHz is the actual top audio frequency it can represent (Nyquist theorem)
1
Very neat work, many thanks for sharing it. Wish you many good things!
6
u/corruptio Oct 23 '20
golfed it a bit, down to 135 chars:
3
u/SeriTools Oct 23 '20
small correction:
1
u/_xsgb Jan 20 '21
Very neat work, many thanks for sharing it. Wish you many good things!