new version
authorTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 00:07:54 +0000 (01:07 +0100)
committerTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 00:07:54 +0000 (01:07 +0100)
bsv.c

diff --git a/bsv.c b/bsv.c
index cb34dc96f14a6dfaa45ff1fb82ddf389540d3af3..086dc12eeb96885b1498e998160fb9463415bafa 100644 (file)
--- a/bsv.c
+++ b/bsv.c
@@ -1,7 +1,7 @@
 typedef unsigned char u8;
 
 int i;
-u8 i0, i1, i2, i3;
+u8 i0, i1, i2;
 
 u8 notes[] = {
        0x84, 0x9d, 0xb0, 0x69, 0x9d, 0x84, 0x69, 0x58,
@@ -19,11 +19,11 @@ u8 g(u8 x, u8 t, u8 o){
 }
 void main(void){
        i = 0;
-       i0 = i1 = i2 = i3 = 0;
+       i0 = i1 = i2 = 0;
        for(;;) {
                u8 sample;
                u8 n = i2<<2 | i1>>6;
-               u8 s = i3<<7 | i2>>1;
+               u8 s = i2>>1;
 
                sample = g(1,n,12);
 
@@ -35,14 +35,14 @@ void main(void){
 
                { u8 tmp1 = s/3;
                  u8 tmp2;
-                 tmp2 = (i3<<13|i2<<5|i1>>3)%3;
+                 tmp2 = (i2<<5|i1>>3)%3;
                  tmp2 += n;
                sample += g(tmp1,tmp2,10);
                } //tmp1, tmp2
 
                { u8 tmp1 = s/5;
                  u8 tmp2 = n;
-                 { u8 tmp3 = (i3<<14|i2<<6|i1>>2)%3;
+                 { u8 tmp3 = (i2<<6|i1>>2)%3;
                    tmp2 -= tmp3;
                  } // tmp3
                  tmp2 += 8;
@@ -55,6 +55,5 @@ void main(void){
                i0++;
                i1 += !i0;
                i2 += !i1 && !i0;
-               i3 += !i2 && !i1 && !i0;
        }
 }
Imprint / Impressum