.50 Convert S3M to IT: Xxx Effect has to be adjusted

Started by Saga Musix, February 29, 2008, 19:13:08

Previous topic - Next topic

Saga Musix

Full Version:
OpenMPT v1.17.02.50

Has the bug occured in previous versions? If yes, please specify version(s): (This option is optional, and doesn't need research. But in case you know...)
yep

Description of the bug:
S3M's Xxx command has a value range from X00 to X80. IT's Xxx command however has a value range from X00 to XFF. So when you convert a S3M file to IT, your module's panning will range from left to middle and not from left to right. This should be corrected.

How to reproduce (step by step description):
Create a S3M module with Xxx panning commands and listen how the panning changes when converting the file to IT.
» 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.

LPChip

So basically convert to a decimal value, and then do the following calculation:

From s3m to it: value *2
from it to s3m: value /2
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

Of course, you have to consider that 0x80 is an even value, whereas 0xFF is odd...
» 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.

älskling

Shouldn't max be $7F (or min be $01)? If not then there's no centre. Not that I would mind, too much music today lacks direction. Also, perhaps some kind of dithering can be used to compensate for the difference in the resolution. Some might argue that's going too far tho...

LPChip, the numeral system used doesn't really matter. So there.

Saga Musix

i don't know about ScreamTracker, but in ModPlug, the maximum slider value is 80 and not 7F. I know that this is strange, but have you have thought about the volume column reaching from 0 to 64 decimal? That's the same thing! I always wondered, since 0...63 would be 6 bits, but 0...64 is one value too much! ;)
» 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.

älskling

Quote from: "Jojo"i don't know about ScreamTracker, but in ModPlug, the maximum slider value is 80 and not 7F. I know that this is strange, but have you have thought about the volume column reaching from 0 to 64 decimal? That's the same thing! I always wondered, since 0...63 would be 6 bits, but 0...64 is one value too much! ;)

It's not really the same thing, as 1 to 64 are volume levels and 0 is off. But now that I think about it, my previous logic was flawed. Of course 40 is center when panning valiues range from 00 to 7F. That means panning from 00 to FF probably should be from 01 to FF to make 80 center. Unless you can pan farther to the left than to the right. That would be weird odd wodd.

Saga Musix

Quoteas 1 to 64 are volume levels and 0 is off
but on/off is yet another bit that has to be stored! you know, this would be logic if v00 would not exist but be just "no effect on this column" (like J00 exists in IT/S3M, but not in XM/MOD since it represents 000 which is just an empty row), but in this case, vxx can store 65 values!
» 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.

LPChip

In S3M/IT, 00 means a shared value (or better said: use whatever was used above).

Now ofcource, this doesn't get up for panning and volume though, only for sliding values, not values that set it.

I opened old Impulse Tracker for this, and the test results are shocking.

In Impulse Tracker, the panning is saved in a S3M file from range X00 to XFF too!

That made me even more curious, so I downloaded Scream Tracker 3.21 to see how it is being handled there.

Scream Tracker 3 has NO support for the X?? effect. It says: X?? is an old Amiga (8xx) effect and is not being used.) Then again, there are only a few panning options in S3M. For instance S8x (gus panning) is there which only has 16 values, and SAx is disabled.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

älskling

Quote from: "LPChip"In S3M/IT, 00 means a shared value (or better said: use whatever was used above).
It doesn't for volume.

Saga Musix

LPChip, Xxx was probably added in Impulse Tracker, yes. So now a real problem is developing... Should the panning range for S3M files also be extended (which would probably destroy some s3m's panning) or should there be a conversion?
» 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.

LPChip

Quote from: "älskling"
Quote from: "LPChip"In S3M/IT, 00 means a shared value (or better said: use whatever was used above).
It doesn't for volume.

In IT it certainly does. I don't know about S3M, but I'd guess that would be too.

Note, I'm talking about slides, not setting the numbers.

So: v00 = no, but D00 = yes. Also V00 is no, W00 is yes.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

LPChip

Quote from: "Jojo"LPChip, Xxx was probably added in Impulse Tracker, yes. So now a real problem is developing... Should the panning range for S3M files also be extended (which would probably destroy some s3m's panning) or should there be a conversion?

I think that its best to set support for X range 0 to 255 as it was ment to be. Atleast thats how Impulse Tracker does it, and since OpenMPT is slightly modeled after IT, I assume that other S3M players are too.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

älskling

Quote from: "LPChip"Note, I'm talking about slides, not setting the numbers.
Yeah I see that now, not that I know why you brought up slides but anyway... Did you edit that post or am I going blind?

LPChip

Quote from: "älskling"
Quote from: "LPChip"Note, I'm talking about slides, not setting the numbers.
Yeah I see that now, not that I know why you brought up slides but anyway... Did you edit that post or am I going blind?

You're going blind, but I forgive you. :lol:
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

I just tested the issue in XMPlay, and it also interprets the panning from X00 to X80. Which is probably less dangerous, since XA4 does a surround effect (probably also in ST3).
» 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.