MSX-Music questions

By Zaalan3

Supporter (4)

Zaalan3's picture

14-05-2014, 08:30

I've come across a lot of differing ways to calculate the f number for MSX Music, so I was wondering, can someone provide me with the standard equation for it? The one I found that 'seems' to work is this:
FNUM = ((frequency/2^18)/50000)/2^(BLOCK-1)
But I'm not sure.

Also, does the FNUM of channels 7-9 have an effect on the RHYTHM drums?

Login or register to post comments

By Daemos

Paragon (2044)

Daemos's picture

14-05-2014, 11:28

EDT: wait that table wasn't correct will post a new one

By Daemos

Paragon (2044)

Daemos's picture

14-05-2014, 11:50

There. This is a 8 octave frequency table for direct use with the FM chip. There may be mistakes in it. I am very bad at calculus but Excel isn't. This one is tested and works.

freqtable:      
        dw 171,182,192,204,216,229,242,257,272,288,306,324		; octave1
        dw 683,694,704,716,728,741,754,769,784,800,818,836		; octave2
        dw 1195,1206,1216,1228,1240,1253,1266,1281,1296,1312,1330,1348	; octave3
        dw 1707,1718,1728,1740,1752,1765,1778,1793,1808,1824,1842,1860	; octave4
        dw 2219,2230,2240,2252,2264,2277,2290,2305,2320,2336,2354,2372	; octave5
        dw 2731,2742,2752,2764,2776,2789,2802,2817,2832,2848,2866,2884	; octave6
        dw 3243,3254,3264,3276,3288,3301,3314,3329,3344,3360,3378,3396	; octave7
        dw 3755,3766,3776,3788,3800,3813,3826,3841,3856,3872,3890	; octave8

By Huey

Prophet (2694)

Huey's picture

14-05-2014, 12:57

Slightly different;

CHIP_FM_ToneTable:
      db    0adh,000h,0b7h,000h,0c2h,000h,0cdh,000h,0d9h,000h,0e6h,000h
      db    0f4h,000h,003h,001h,012h,001h,022h,001h,034h,001h,046h,001h
      db    0adh,002h,0b7h,002h,0c2h,002h,0cdh,002h,0d9h,002h,0e6h,002h
      db    0f4h,002h,003h,003h,012h,003h,022h,003h,034h,003h,046h,003h
      db    0adh,004h,0b7h,004h,0c2h,004h,0cdh,004h,0d9h,004h,0e6h,004h
      db    0f4h,004h,003h,005h,012h,005h,022h,005h,034h,005h,046h,005h
      db    0adh,006h,0b7h,006h,0c2h,006h,0cdh,006h,0d9h,006h,0e6h,006h
      db    0f4h,006h,003h,007h,012h,007h,022h,007h,034h,007h,046h,007h
      db    0adh,008h,0b7h,008h,0c2h,008h,0cdh,008h,0d9h,008h,0e6h,008h
      db    0f4h,008h,003h,009h,012h,009h,022h,009h,034h,009h,046h,009h
      db    0adh,00ah,0b7h,00ah,0c2h,00ah,0cdh,00ah,0d9h,00ah,0e6h,00ah
      db    0f4h,00ah,003h,00bh,012h,00bh,022h,00bh,034h,00bh,046h,00bh
      db    0adh,00ch,0b7h,00ch,0c2h,00ch,0cdh,00ch,0d9h,00ch,0e6h,00ch
      db    0f4h,00ch,003h,00dh,012h,00dh,022h,00dh,034h,00dh,046h,00dh
      db    0adh,00eh,0b7h,00eh,0c2h,00eh,0cdh,00eh,0d9h,00eh,0e6h,00eh
      db    0f4h,00eh,003h,00fh,012h,00fh,022h,00fh,034h,00fh,046h,00fh