|
Here's a table I used in an old sound test program I made. I don't know the formula exactly for converting the frequency to a note, but I modified this table from Nerdtracker 2's replay code. NT2's code has the high and low bytes seperated, this table is the whole 11-bit value in one word.
The first note listed (the lowest), is A-1.
note_table .dw 2034,1920,1812 ; 6 .dw 1710,1614,1524,1438,1358,1281,1209,1142,1077,1017,960, 906 ;30 .dw 855,807,762,719,679,641,605,571,539,509,480,453 ;54 .dw 428,404,381,360,339,320,302,285,269,254,240,227 ;78 .dw 214,202,190,180,170,160,151,143,135,127,120,113 ;102 .dw 107,101,95, 90, 85, 80, 76, 71, 67, 64, 60, 57 ;126 .dw 53, 50, 48, 45, 42, 40, 38, 36, 34, 32, 30, 28 ;150 .dw 27, 25, 24, 22, 21, 20, 19, 18, 17, 16, 15, 14 ;174 .dw 13, 13, 12, 11, 11, 10, 9, 9, 8, 8, 7, 7 ;198
|