new version
[Chiptunes-pms150c.git] / bsv.c
CommitLineData
b3a565e1
TG
1typedef unsigned char u8;
2
c320426f
TG
3u8 notes[] = "Qj}6jQ6%BY}6YB6%";
4
b3a565e1 5u8 g(int i, u8 x, u8 t, u8 o){
c320426f 6 return((3&x&(i*(notes[t%8 + 8*!!(3&i>>16)]+51)>>o))<<4);
c395d5c8 7}
b3a565e1 8void main(int i, u8 n, u8 s){
fef0e35b
TG
9 for(i=0;;i++) {
10 u8 sample;
11 sample = g(i,1,n=i>>14,12);
12 sample += g(i,s=i>>17,n^i>>13,10);
13 sample += g(i,s/3,n+((i>>11)%3),10);
14 sample += g(i,s/5,8+n-((i>>10)%3),9);
15 putchar(sample);
16 }
c395d5c8 17}
Imprint / Impressum