From 8a26e9766326f9cc4adc53a0554b625126b9e463 Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Thu, 4 Mar 2021 00:45:49 +0100 Subject: [PATCH] new version --- bsv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bsv.c b/bsv.c index bf3e991..0b9d3b3 100644 --- a/bsv.c +++ b/bsv.c @@ -9,7 +9,10 @@ u8 notes[] = { u8 g(u8 x, u8 t, u8 o){ u8 notes_ix = t%8 + 8*!!(3&i>>16); - return((3&x&(i*(notes[notes_ix])>>o))<<4); + u8 result = (i*notes[notes_ix])>>o; + result &= x; + result &= 3; + return result; } void main(void){ i = 0; @@ -29,7 +32,7 @@ void main(void){ u8 tmp2 = 8+n-((i>>10)%3); sample += g(tmp1,tmp2,9); } //tmp1, tmp2 - putchar(sample); + putchar(sample<<4); i++; } } -- 2.39.3