This is an archival post of an experiment I made in 2012 and originally posted at the Famitracker forums at that time.
The idea came from this discussion: http://forums.nesdev.com/viewtopic.php?f=6&t=5473
We determined that the tuning scheme of the DPCM playback frequencies appeared intended to play a C major scale and a few other notes tuned to A440. However, there also appears to be a mistake in how they implemented sample lengths, causing them to read 1 extra byte at the end of the sample. For looped samples this causes the pitch to lower by that relative length, so in the case of the smallest practical looped sample that could have been used (16+1 bytes) the intended playback pitch is lowered by a ratio of 16/17. This is close to a semitone, but not quite equivalent.
As an experiment, I composed this piece in Famitracker, with accompanying tracks one semitone lower, but then replaced the tuning tables to correct the rest of that tuning difference between 16/17 and 100 cents. The NSF plays with this corrected tuning table, and the Famitracker FTM will play at the original semitone approximation.
Overall the result isn't that compelling, mainly because the DPCM tuning is very imprecise to begin with. Matching its A440 scheme kind of centres the error, but it's still not very well in tune, especially on PAL where two of the frequencies are further off than they should be. It was intended only as a exploration of how close I could get under ideal circumstances.
Another thread that might be useful information, where other possible sample lengths are explored:
https://forums.nesdev.com/viewtopic.php?f=6&t=13169
The idea came from this discussion: http://forums.nesdev.com/viewtopic.php?f=6&t=5473
We determined that the tuning scheme of the DPCM playback frequencies appeared intended to play a C major scale and a few other notes tuned to A440. However, there also appears to be a mistake in how they implemented sample lengths, causing them to read 1 extra byte at the end of the sample. For looped samples this causes the pitch to lower by that relative length, so in the case of the smallest practical looped sample that could have been used (16+1 bytes) the intended playback pitch is lowered by a ratio of 16/17. This is close to a semitone, but not quite equivalent.
As an experiment, I composed this piece in Famitracker, with accompanying tracks one semitone lower, but then replaced the tuning tables to correct the rest of that tuning difference between 16/17 and 100 cents. The NSF plays with this corrected tuning table, and the Famitracker FTM will play at the original semitone approximation.
Overall the result isn't that compelling, mainly because the DPCM tuning is very imprecise to begin with. Matching its A440 scheme kind of centres the error, but it's still not very well in tune, especially on PAL where two of the frequencies are further off than they should be. It was intended only as a exploration of how close I could get under ideal circumstances.
Another thread that might be useful information, where other possible sample lengths are explored:
https://forums.nesdev.com/viewtopic.php?f=6&t=13169