From: <sv...@op...> - 2024-08-09 18:11:35
|
Author: sagamusix Date: Fri Aug 9 20:11:24 2024 New Revision: 21376 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21376 Log: Merged revision(s) 21375 from trunk/OpenMPT: [Fix] MED: For MOD-style vibrato, a speed parameter of 0 was not treated as effect memory, and the speed "fixup" was incorrect anyway. For both vibrato types, the speed is now correct (position incremented on every tick). Fixes Untitled6.med by Apollon (https://www.un4seen.com/forum/?topic=15448.msg143464#msg143464). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Load_med.cpp branches/OpenMPT-1.31/soundlib/Sndmix.cpp Modified: branches/OpenMPT-1.31/soundlib/Load_med.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_med.cpp Fri Aug 9 20:10:02 2024 (r21375) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Fri Aug 9 20:11:24 2024 (r21376) @@ -411,7 +411,7 @@ switch(command) { case 0x04: // Vibrato (twice as deep as in ProTracker) - m.SetEffectCommand(CMD_VIBRATO, (std::min<uint8>(param >> 3, 0x0F) << 4) | std::min<uint8>((param & 0x0F) * 2, 0x0F)); + m.SetEffectCommand(CMD_VIBRATO, (param & 0xF0) | std::min<uint8>((param & 0x0F) * 2, 0x0F)); break; case 0x08: // Hold and decay break; @@ -491,7 +491,7 @@ m.SetEffectCommand(CMD_MODCMDEX, 0x20 | nibbleLo); break; case 0x14: // Vibrato (ProTracker compatible depth, but faster) - m.SetEffectCommand(CMD_VIBRATO, (std::min<uint8>((param >> 4) + 1, 0x0F) << 4) | (param & 0x0F)); + m.SetEffectCommand(CMD_VIBRATO, param); break; case 0x15: // Set finetune m.SetEffectCommand(CMD_MODCMDEX, 0x50 | (param & 0x0F)); Modified: branches/OpenMPT-1.31/soundlib/Sndmix.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Sndmix.cpp Fri Aug 9 20:10:02 2024 (r21375) +++ branches/OpenMPT-1.31/soundlib/Sndmix.cpp Fri Aug 9 20:11:24 2024 (r21376) @@ -1643,7 +1643,7 @@ if(chn.dwFlags[CHN_VIBRATO]) { - const bool advancePosition = !m_SongFlags[SONG_FIRSTTICK] || ((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) && !(m_SongFlags[SONG_ITOLDEFFECTS])); + const bool advancePosition = !m_SongFlags[SONG_FIRSTTICK] || ((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_MED)) && !(m_SongFlags[SONG_ITOLDEFFECTS])); if(GetType() == MOD_TYPE_669) { |