From 90a7e16978f4798af5c7abcb09ad9f2c1d156ee1 Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Thu, 4 Mar 2021 01:09:10 +0100 Subject: [PATCH] new version --- bsv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bsv.c b/bsv.c index 086dc12..ed30e94 100644 --- a/bsv.c +++ b/bsv.c @@ -1,6 +1,5 @@ typedef unsigned char u8; -int i; u8 i0, i1, i2; u8 notes[] = { @@ -12,13 +11,12 @@ u8 g(u8 x, u8 t, u8 o){ u8 notes_ix = t & 0x7; if(3&i2) notes_ix += 8; - u8 result = (i*notes[notes_ix])>>o; + u8 result = ((i1<<8|i0)*notes[notes_ix])>>o; result &= x; result &= 3; return result; } void main(void){ - i = 0; i0 = i1 = i2 = 0; for(;;) { u8 sample; @@ -51,7 +49,6 @@ void main(void){ putchar(sample<<4); - i++; i0++; i1 += !i0; i2 += !i1 && !i0; -- 2.39.3