ModPlug Central

OpenMPT Development (Archive) => Bug Reports => Bug Report Archive => Topic started by: metaplasma on April 27, 2009, 05:33:02

Title: .52 AMF file continue portamento up incorrectly hand
Post by: metaplasma on April 27, 2009, 05:33:02
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;
Title: .52 AMF file continue portamento up incorrectly hand
Post by: LPChip on April 27, 2009, 07:55:30
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:
Title: clarification
Post by: metaplasma on April 27, 2009, 10:28:56
I've adjusted the description / content to include the version I tested (SVN revision 254)
I hope this is what you were looking for
Title: .52 AMF file continue portamento up incorrectly hand
Post by: Saga Musix on April 27, 2009, 15:00:33
well, next version is going to be .53, so i'll add that to the topic.
Title: .52 AMF file continue portamento up incorrectly hand
Post by: Saga Musix on April 27, 2009, 19:44:18
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. :)
Title: .52 AMF file continue portamento up incorrectly hand
Post by: Relabsoluness on April 27, 2009, 21:06:03
(changed the version in topic to .52 as this bug has not appeared in version .53)
Title: .52 AMF file continue portamento up incorrectly hand
Post by: Saga Musix on June 13, 2009, 15:46:30
I close this report as the patch has been applied.