git://git.gir.st
/
Chiptunes-pms150c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1873be
)
new version
author
Tobias Girstmair
<tobi@isticktoit.net>
Wed, 3 Mar 2021 23:45:49 +0000
(
00:45
+0100)
committer
Tobias Girstmair
<tobi@isticktoit.net>
Wed, 3 Mar 2021 23:45:49 +0000
(
00:45
+0100)
bsv.c
patch
|
blob
|
blame
|
history
diff --git
a/bsv.c
b/bsv.c
index bf3e991a07b3182f2ac0fc916ee3852d7c45e917..0b9d3b3242600cf2a45dafc4fc583a5628291170 100644
(file)
--- 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++;
}
}