Pro Tracker Periods?!

Started by Jesse Blue, September 09, 2025, 19:01:22

Previous topic - Next topic

Jesse Blue

Which of those periods for MOD files is correct?
(Notice the difference at the last value of octave 0, 906 and 907.)
Maybe both?
How does OpenMTP deal with period values that it encounters in MOD files?

    [   // tuning 0
        1712,1616,1524,1440,1356,1280,1208,1140,1076,1016, 960, 906, /* octave 0 */
         856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453, /* octave 1 */
         428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, 226, /* octave 2 */
         214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, 113, /* octave 3 */
         107, 101,  95,  90,  85,  80,  75,  71,  67,  63,  60,  56, /* octave 4 */
          53,  50,  47,  45,  42,  40,  37,  35,  33,  31,  30,  28, /* octave 5 */
    ],

    [   // tuning 0
        1712,1616,1525,1440,1357,1281,1209,1141,1077,1017, 961, 907, /* octave 0 */
         856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453, /* octave 1 */
         428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, 226, /* octave 2 */
         214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, 113, /* octave 3 */
         107, 101,  95,  90,  85,  80,  76,  71,  67,  64,  60,  57, /* octave 4 */
          53,  50,  47,  45,  42,  40,  37,  35,  33,  31,  30,  28, /* octave 5 */
    ],

Saga Musix

The truth is that there are many different tables being used in the wild by various tools and trackers, so there is no one single table that will work for all MOD files. OpenMPT uses neither of those two tables, for instance. ;) A common approach is to pick the closest match, which is what OpenMPT is doing in MODTools.cpp, function ReadMODPatternEntry, so it wouldn't matter if the value was 907, 906, 919 or 900, they all would be rounded to the same note.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Jesse Blue

Thank you! It doesn't feel good but here we go. :-)

Saga Musix

Unfortunately you will have that feeling with a lot of MOD-related stuff. ;) There are simply so many trackers and tools that write this format that the number of modules that don't strictly conform to the format. Hence OpenMPT's MOD load is probably one of hte most complex ones you can find, but all the complexity is there for a reason. ;)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Amaroq Starwind

#4
Hopefully its complexity doesn't grow too rapidly from its current state  it doesn't have to get much more complex than it already is. That'd be a nightmare to maintain.

- edited to make more sense -

Saga Musix

There is absolutely nothing ever happening rapidly in development of well-documented, 30+ year old formats.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Amaroq Starwind

Er... I used the wrong word again, that happens when I'm tired. I'll edit my post.