From: <sv...@op...> - 2025-05-03 16:24:29
|
Author: sagamusix Date: Sat May 3 18:24:02 2025 New Revision: 23148 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23148 Log: [Fix] XM: Only update Offset effect memory when the command is next to a note. Test case: OffsetWithoutNote.xm (tx cyrb) [Mod] OpenMPT: Version is now 1.33.00.02 Modified: trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/UpgradeModule.cpp Modified: trunk/OpenMPT/common/versionNumber.h ============================================================================== --- trunk/OpenMPT/common/versionNumber.h Sat May 3 18:23:32 2025 (r23147) +++ trunk/OpenMPT/common/versionNumber.h Sat May 3 18:24:02 2025 (r23148) @@ -16,4 +16,4 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 33 #define VER_MINOR 00 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp Sat May 3 18:23:32 2025 (r23147) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp Sat May 3 18:24:02 2025 (r23148) @@ -753,6 +753,7 @@ case kLegacyPPQpos: desc = _T("Report inaccurate PPQ position to VST plugins (like OpenMPT 1.31 and older)"); break; case kLegacyPluginNNABehaviour: desc = _T("Plugin notes with New Note Action set to Continue are affected by note-offs (like OpenMPT 1.31 and older)"); break; case kITCarryAfterNoteOff: desc = _T("Note-Off status does not influence Envelope Carry behaviour"); break; + case kFT2OffsetMemoryRequiresNote: desc = _T("Offset effect memory is only updated when the command is next to a note"); break; default: MPT_ASSERT_NOTREACHED(); } Modified: trunk/OpenMPT/soundlib/Snd_defs.h ============================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h Sat May 3 18:23:32 2025 (r23147) +++ trunk/OpenMPT/soundlib/Snd_defs.h Sat May 3 18:24:02 2025 (r23148) @@ -616,6 +616,7 @@ kLegacyPPQpos, // Report fake PPQ position to VST plugins kLegacyPluginNNABehaviour, // Plugin notes with NNA=continue are affected by note-offs etc. kITCarryAfterNoteOff, // Envelope Carry continues to function as normal even after note-off + kFT2OffsetMemoryRequiresNote, // Offset memory is only updated when offset command is next to a note // Add new play behaviours here. Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp Sat May 3 18:23:32 2025 (r23147) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp Sat May 3 18:24:02 2025 (r23148) @@ -5656,7 +5656,9 @@ // No X-param (normal behaviour) const bool isPercentageOffset = (m.volcmd == VOLCMD_OFFSET && m.vol == 0); offset <<= 8; - if(offset) + // FT2 compatibility: 9xx command without a note next to it does not update effect memory. + // Test case: OffsetWithoutNote.xm + if(offset && (!m_playBehaviour[kFT2OffsetMemoryRequiresNote] || m.IsNote())) chn.oldOffset = offset; else if(m.volcmd != VOLCMD_OFFSET) offset = chn.oldOffset; Modified: trunk/OpenMPT/soundlib/Sndfile.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp Sat May 3 18:23:32 2025 (r23147) +++ trunk/OpenMPT/soundlib/Sndfile.cpp Sat May 3 18:24:02 2025 (r23148) @@ -1269,6 +1269,7 @@ playBehaviour.set(kFT2NoteDelayWithoutInstr); playBehaviour.set(kFT2PortaResetDirection); playBehaviour.set(kFT2AutoVibratoAbortSweep); + playBehaviour.set(kFT2OffsetMemoryRequiresNote); break; case MOD_TYPE_S3M: Modified: trunk/OpenMPT/soundlib/UpgradeModule.cpp ============================================================================== --- trunk/OpenMPT/soundlib/UpgradeModule.cpp Sat May 3 18:23:32 2025 (r23147) +++ trunk/OpenMPT/soundlib/UpgradeModule.cpp Sat May 3 18:24:02 2025 (r23148) @@ -627,6 +627,7 @@ { kITFT2DontResetNoteOffOnPorta, MPT_V("1.29.00.34") }, { kFT2PortaResetDirection, MPT_V("1.30.00.40") }, { kFT2AutoVibratoAbortSweep, MPT_V("1.32.00.29") }, + { kFT2OffsetMemoryRequiresNote, MPT_V("1.32.00.43") }, }; for(const auto &b : behaviours) |