Hello,

If you are knowledgeable about sound effects and how they are stored in the NES please try to read my question to the end. I may use some uncommon terms but I try to explain myself as much and as clearly as I can, and if you can't understand something I'll be happy to answer any clarification question in the comments.

Also, English is not my mother-tongue, so sorry if my English is not very good.

So I thought about my question after watching this video:

It talks about the sound effects in Super Mario Bros 3 and it shows the bytes in which some of them are encoded.

The bytes that are used for the 1up sound, as shown by this video (in the end of the 12th minute) are:

$54 ,dec. 84, for E

$47 ,dec. 71, for G

$2A, dec. 42, for (higher) E

$35, dec. 53, for C

$2F, dec. 47, for D

$23, dec. 35, for (higher) G

On this basis I conjectured that this is some kind of an undertonal system, in which every byte says how much cycles are in the corresponding note's period.

The problem is that these numbers are far from optimal for this sound effect. They do approximate the notes on a 12-tone equal tempered system, the standard system the vast majority of us use today, but all of the nice intervals we hear in music are essentially only approximations of true, just intervals, which are ratios between small integers – they could do it perfectly if they used the values 72, 60, 36, 45, 40 and 30 instead, but in the current solution even the octave between the two Gs, the most basic interval, the only just interval that is preserved even in our corrupted, tempered system, is ruined with a value of 71/35.

So my question is why Toshihiko Nakago and Koji Kondo chose to write it this way and not the other way. was it because of ignorance? because Koji Kondo insisted on the exact notes but there was a constant high frequency that all the notes had to be undertones of? was it something else I'm missing?

and I also want to know what the exact base frequency is. using some python code I found that if they just divided the base frequency by each wanted frequency and rounded it to the nearest integer it has to be between 110543Hz and 111327Hz, but what is the exact number, and why was it chosen?

P.S. while writing this question I noticed that if you add 1 to all of the numbers (because 0 may also be a usable value?) you actually get nice and smooth numbers for C, D and the Gs and "bad" numbers only for the Es. Furthermore, this way the A of 112,640Hz is a good candidate for the mysterious frequency, because (in certain JI scales or under meantone,) D = A/3, G = A/9 and C = A/27 (up to powers of 2), and these are really the numbers we get. This can also explain the value of the Es which turn out to be rounded powers of 2 divided by 3, and indeed, (in certain JI scales or under meantone,) E = A*3. But is all of this just a coincidence or is it the real reason behind all of that?