.52 AMF file continue portamento up incorrectly hand

Started by metaplasma, April 27, 2009, 05:33:02

Previous topic - Next topic

metaplasma

Full Version:
OpenMPT v1.17.02.52
SVN version 254.

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...)
Yes - all versions prior and including SVN version 254.

Description of the bug:
AMF files use the same effect for both portamento up and down, which means to handle continue portamento up, the effect parameter 0x80 - needs to be treated as portamento up, 0 (continue), in the same way as parameter 0x00 is continue portamento down.

How often does it happen?:
Always

How to reproduce (step by step description):

Here is the patch for this (recently applied to libmodplug (fixed in 0.8.7))

Index: LOAD_AMF.CPP
===================================================================
--- LOAD_AMF.CPP   (revision 254)
+++ LOAD_AMF.CPP   (working copy)
@@ -109,7 +109,7 @@
                  else param = (param&0x0F)<<4;
                  break;
         // 0x04: Porta Up/Down
-         case 0x04:   if (param & 0x80) { command = CMD_PORTAMENTOUP; param = -(signed char)param; }
+         case 0x04:   if (param & 0x80) { command = CMD_PORTAMENTOUP; param = (-(signed char)param)&0x7F; }
                  else { command = CMD_PORTAMENTODOWN; } break;
         // 0x06: Tone Portamento
         case 0x06:   command = CMD_TONEPORTAMENTO; break;

LPChip

I can understand that you say all, but all is not a valid option.

If we get a new build which fixes this problem, then all doesn't apply anymore.

Can you tell me what version you tested this with, so we can adjust the topic to match that? Otherwise, we couldn't fix it because then the topic wouldn't be true anymore :nuts:
"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

metaplasma

I've adjusted the description / content to include the version I tested (SVN revision 254)
I hope this is what you were looking for

Saga Musix

well, next version is going to be .53, so i'll add that to the topic.
» 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.

Saga Musix

Oh, and thanks for the fix btw. I have a few modules in AMF and support for them really seems to be sub-par (especially when it comes to volume and pitch), so any fix is welcome. :)
» 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.

Relabsoluness

(changed the version in topic to .52 as this bug has not appeared in version .53)

Saga Musix

I close this report as the patch has been applied.
» 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.