From: <sv...@op...> - 2025-05-03 16:25:07
|
Author: sagamusix Date: Sat May 3 18:24:40 2025 New Revision: 23149 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23149 Log: Merged revision(s) 23148 from trunk/OpenMPT: [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.32.00.43 ........ Modified: branches/OpenMPT-1.32/ (props changed) branches/OpenMPT-1.32/common/versionNumber.h branches/OpenMPT-1.32/mptrack/dlg_misc.cpp branches/OpenMPT-1.32/soundlib/Snd_defs.h branches/OpenMPT-1.32/soundlib/Snd_fx.cpp branches/OpenMPT-1.32/soundlib/Sndfile.cpp branches/OpenMPT-1.32/soundlib/UpgradeModule.cpp Modified: branches/OpenMPT-1.32/common/versionNumber.h ============================================================================== --- branches/OpenMPT-1.32/common/versionNumber.h Sat May 3 18:24:02 2025 (r23148) +++ branches/OpenMPT-1.32/common/versionNumber.h Sat May 3 18:24:40 2025 (r23149) @@ -16,4 +16,4 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 32 #define VER_MINOR 00 -#define VER_MINORMINOR 42 +#define VER_MINORMINOR 43 Modified: branches/OpenMPT-1.32/mptrack/dlg_misc.cpp ============================================================================== --- branches/OpenMPT-1.32/mptrack/dlg_misc.cpp Sat May 3 18:24:02 2025 (r23148) +++ branches/OpenMPT-1.32/mptrack/dlg_misc.cpp Sat May 3 18:24:40 2025 (r23149) @@ -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: branches/OpenMPT-1.32/soundlib/Snd_defs.h ============================================================================== --- branches/OpenMPT-1.32/soundlib/Snd_defs.h Sat May 3 18:24:02 2025 (r23148) +++ branches/OpenMPT-1.32/soundlib/Snd_defs.h Sat May 3 18:24:40 2025 (r23149) @@ -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: branches/OpenMPT-1.32/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.32/soundlib/Snd_fx.cpp Sat May 3 18:24:02 2025 (r23148) +++ branches/OpenMPT-1.32/soundlib/Snd_fx.cpp Sat May 3 18:24:40 2025 (r23149) @@ -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: branches/OpenMPT-1.32/soundlib/Sndfile.cpp ============================================================================== --- branches/OpenMPT-1.32/soundlib/Sndfile.cpp Sat May 3 18:24:02 2025 (r23148) +++ branches/OpenMPT-1.32/soundlib/Sndfile.cpp Sat May 3 18:24:40 2025 (r23149) @@ -1269,6 +1269,7 @@ playBehaviour.set(kFT2NoteDelayWithoutInstr); playBehaviour.set(kFT2PortaResetDirection); playBehaviour.set(kFT2AutoVibratoAbortSweep); + playBehaviour.set(kFT2OffsetMemoryRequiresNote); break; case MOD_TYPE_S3M: Modified: branches/OpenMPT-1.32/soundlib/UpgradeModule.cpp ============================================================================== --- branches/OpenMPT-1.32/soundlib/UpgradeModule.cpp Sat May 3 18:24:02 2025 (r23148) +++ branches/OpenMPT-1.32/soundlib/UpgradeModule.cpp Sat May 3 18:24:40 2025 (r23149) @@ -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) |