algorithmic music in a "constructivist" way by a1k0n (2011-10-03)
Original: news.ycombinator.com/item?id=3063359#3064980
Using this as a test to translate beatbytes to dittytoys.
Log in to post a comment.
// algorithmic music in a "constructivist" way by a1k0n (2011-10-03) // Original: https://news.ycombinator.com/item?id=3063359#3064980 // Dollchan: https://dollchan.net/bytebeat/#v3b64JYtdDoIwEISvQpoIu3XRbcuPNrTEeISegFQT3yDQN+PdLfrN23wzbxHnx1NYEYKDjWZaaUHnIbrtFF/Tes/2lgCS9yseFiSjnYsjW6PKJLWUEM9K1zNmI0OAigsudvqcHTa9HYaKOlKcz3hsJaSy4Ws3/uamr6ihCxmUsLf137aI3ittGcXnCw // Using this as a test to map beatbytes to dittytoys. const beatByteSampleRate = 8000; function beatbyte(t) { let c; let SS; return SS=(s,o,r,p)=>(c=s.charCodeAt((t>>r)%p),32==c?0:31&t*2**(c/12-o)),3*SS('0 0 7 7 037:<<',6,10,32)+5*(t&4096?SS('037',4,8,3)*(4096-(t&4095))>>12:0) } const osc = synth.def(() => beatbyte(ditty.time * beatByteSampleRate) / 128); osc.play(c4, { duration: 1000.0 });