pouët.net

Go to bottom

octaves in the mod fileformat

category: code [glöplog]
there seem to be only 5 octaves in the docs that i read (Brett Paterson, Mark Feldman and Erland Van Olmen).
i observe that there should be a total of 8 octaves.
does anyone have a complete table of the octaves including the finetune values?
added on the 2012-01-14 16:40:57 by rudi rudi
AMIGA MOD files have 3 octaves, "extended" PC MOD files have 5 octaves. There should be no MOD files with 8 octaves.
Saga Musix: thanks for clarifying, however that doesnt explain why ft2 saves them. also with the M.K. ID-tag
added on the 2012-01-14 16:48:21 by rudi rudi
Obviously because FT2 sucks. There are few players which support a greater octave range in MOD files, but even FT2 fucks up the MOD files it writes - a C-0 with instrument 1 next to it becomes an E-1 with instrument 11 (hex) next to it, for example (looks like the bytes are not ORed properly). Don't rely on this at all.
Saga Musix: why are you bashin ft2 just because it may be not saving nor playing mod-files correctly? it was great for making extended modules. also it wasnt this kind of info i was out after.

i might just work on the octaves myself since its not such a big deal.
added on the 2012-01-14 17:06:15 by rudi rudi
Quote:
why are you bashin ft2 just because it may be not saving nor playing mod-files correctly?

Have you ever written a XM tracker or player? If not, please don't argue, thank you.

Anyway, instead of using huge tables, look at how schism tracker does it:

Code:const uint16_t period_table[12] = { 1712, 1616, 1524, 1440, 1356, 1280, 1208, 1140, 1076, 1016, 960, 907, }; static int _mod_period_to_note(int period) { int n; if (period) for (n = 0; n <= NOTE_LAST; n++) if (period >= (32 * period_table[n % 12] >> (n / 12 + 2))) return n + 1; return NOTE_NONE; }
Quote:
Have you ever written a XM tracker or player? If not, please don't argue, thank you.


what has that anything to do with it?

no, i wasnt out after any code either.
added on the 2012-01-14 17:28:38 by rudi rudi
xm rules, it sucks
added on the 2012-01-14 17:36:51 by dipswitch dipswitch
Quote:
what has that anything to do with it?

You would then understand how horrible FT2 and its code and everything related to it is. That includes how FT2 plays and saves MODs. If you expect it to do something in a certain way, you can almost be sure that it won't do it that way.
i dont care about that Saga Musix
added on the 2012-01-14 17:44:37 by rudi rudi
It's not like ft2 was the only one that messed up/went beyond file specs. :P
added on the 2012-01-14 17:48:26 by tomaes tomaes
that is so right tomaes.
added on the 2012-01-14 17:51:44 by rudi rudi
It is certainly a hot candidate for the tracker that did this in the most extensive and most unpredictable way. :P
with mpt not far behind. :)

still, ft2 is one of the very few actually culturally important pieces of demoscene software, no matter how terrible the code might have been. Someone should bug starbreeze to release the code for shits and giggles. (kb might still have a copy too. ;)
added on the 2012-01-14 18:06:47 by tomaes tomaes
Quote:
with mpt not far behind

Most incompatibilities with FT2 came from the fact that mpt did the contrary - it did things the way you'd expect them to be done - well, most of the time. OpenMPT does things the same unpredictable way as FT2, though. After years of isolating FT2's idiosyncrasies, some of them actually begin to make sense - depending your definition of sense.
IIRC it also saved 64ch XMs at one point and bloated up IT files with MPT-only features as well. I'm sure stuff like this has been fixed, just saying...
added on the 2012-01-14 18:38:51 by tomaes tomaes
i see that fast-charger 2 / md mostly uses octaves between 4 and 5. the octave ranges goes from 0 to 7 in ft2 as i was sayin.. i wonder if this tune would work in protracker and if so what octave it shows! so that i can be sure that the octave really goes between 1 and 5. hence 5 octaves. instead of 0 to 5 (counting zero). which would be six and out of the specs definition.
added on the 2012-01-14 19:35:43 by rudi rudi
The Amiga MOD format (Protracker, etc...) has only 3 octaves.

If some brave musician wanna do a MOD file (compatible with Protracker) using Milkytracker (for instance) then he (or she) should limit the note range in that module to the notes between C-3 and B-5 in Milkytracker.

There are, of course, more limits to consider (up to 31 mono samples, 8 bit, no more than 64kb long, 4 channels, etc...) but those are, more or less, well managed by the "export to MOD" option.

You can also use Protracker in UAE!
added on the 2012-01-14 20:15:56 by ham ham
Protracker octaves are labeled from 1 through 3. Everything out of this range will probably break the player since the interrupt period is too high or too low.
Saga Musix: You are speaking the truth but someone could think that C-1 in Protracker is C-1 in another tracker (in general, not true)... WARNING! Potential deadline failure alert! It's not the case that all trackers share the same octave numbers (corresponding to identical pitches). In Milkytracker the correct range (making an Amiga MOD with that program) before the final conversion (before deliver it to the Amiga coder) is C-3 to B-5.

Those range is translated to C-1 to B-3 in Protracker. Everything outside that range is translated in "garbagenotes".

I just say this to clarify that the pitch of a note with some "numerical label of an octave" in a tracker may not be the same pitch that the pitch of a note with the same "numerical label of an octave" in other tracker.

C-3 in Milkytracker is C-1 in Protracker. I don't know about OpenMPT but maybe is the same case.
added on the 2012-01-14 20:40:43 by ham ham
Yeah, I should probably have mentioned that. It's best to simply say what's the "middle c". In FT2-alike trackers, it should be C-4 (lowest octave is C-0), in IT-like trackers (including OpenMPT) it's C-5 (lowest octave is also C-0). So the middle c in ProTracker is obviously C-2.
Saga Musix: well, why wouldnt you mention it if you allready knew? instead of wasting alot of time bashing ft2 for example.

anyway ham did exactly go into the core of the issue i am facing.
added on the 2012-01-14 20:58:04 by rudi rudi
Quote:
Saga Musix: well, why wouldnt you mention it if you allready knew?
Because it's simply too obvious for me that not every tracker has the same middle c octave? Yes, it can be that simple sometimes.
thats beyond my point.
added on the 2012-01-14 23:12:32 by rudi rudi
My tunes are so simple that they fit well in 5 octaves. Well even in 3.
added on the 2012-01-14 23:38:02 by Serpent Serpent

login

Go to top