new version
authorTobias Girstmair <tobi@isticktoit.net>
Wed, 3 Mar 2021 23:28:46 +0000 (00:28 +0100)
committerTobias Girstmair <tobi@isticktoit.net>
Wed, 3 Mar 2021 23:28:46 +0000 (00:28 +0100)
bsv.c

diff --git a/bsv.c b/bsv.c
index 1b39eff339e5eee817679f2ef643324c763f430e..cd05728b2051bd1647a49b7a10a6112bcc0da794 100644 (file)
--- a/bsv.c
+++ b/bsv.c
@@ -6,10 +6,12 @@ u8 g(int i, u8 x, u8 t, u8 o){
        return((3&x&(i*(notes[t%8 + 8*!!(3&i>>16)]+51)>>o))<<4);
 }
 void main(int i, u8 n, u8 s){
-       for(i=0;;i++) putchar(
-               g(i,1,n=i>>14,12)+
-               g(i,s=i>>17,n^i>>13,10)+
-               g(i,s/3,n+((i>>11)%3),10)+
-               g(i,s/5,8+n-((i>>10)%3),9)
-       );
+       for(i=0;;i++) {
+               u8 sample;
+               sample = g(i,1,n=i>>14,12);
+               sample += g(i,s=i>>17,n^i>>13,10);
+               sample += g(i,s/3,n+((i>>11)%3),10);
+               sample += g(i,s/5,8+n-((i>>10)%3),9);
+               putchar(sample);
+       }
 }
Imprint / Impressum