From: <sv...@op...> - 2024-05-28 16:20:18
|
Author: sagamusix Date: Sun May 26 00:52:48 2024 New Revision: 20853 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20853 Log: [Imp] Further fixes for formats where auto tone portamento is not reset by parameter 0. Modified: trunk/OpenMPT/soundlib/Load_far.cpp trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Load_xmf.cpp trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Load_far.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_far.cpp Sun May 26 00:37:33 2024 (r20852) +++ trunk/OpenMPT/soundlib/Load_far.cpp Sun May 26 00:52:48 2024 (r20853) @@ -168,7 +168,7 @@ Order().SetDefaultSpeed(fileHeader.defaultSpeed); Order().SetDefaultTempoInt(80); m_nDefaultGlobalVolume = MAX_GLOBAL_VOLUME; - m_SongFlags = SONG_LINEARSLIDES | SONG_AUTO_TONEPORTA; + m_SongFlags = SONG_LINEARSLIDES | SONG_AUTO_TONEPORTA | SONG_AUTO_TONEPORTA_CONT; m_playBehaviour.set(kPeriodsAreHertz); m_modFormat.formatName = U_("Farandole Composer"); Modified: trunk/OpenMPT/soundlib/Load_ult.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ult.cpp Sun May 26 00:37:33 2024 (r20852) +++ trunk/OpenMPT/soundlib/Load_ult.cpp Sun May 26 00:52:48 2024 (r20853) @@ -312,8 +312,10 @@ m_modFormat.madeWithTracker = U_("UltraTracker ") + versions[fileHeader.version - '1']; m_modFormat.charset = mpt::Charset::CP437; - m_SongFlags = SONG_AUTO_TONEPORTA | SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS; // this will be converted to IT format by MPT. + m_SongFlags = SONG_AUTO_TONEPORTA | SONG_AUTO_TONEPORTA_CONT | SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS; // this will be converted to IT format by MPT. m_playBehaviour.reset(kITClearPortaTarget); + m_playBehaviour.reset(kITPortaTargetReached); + m_playBehaviour.set(kFT2PortaTargetNoReset); // Read "messageLength" lines, each containing 32 characters. m_songMessage.ReadFixedLineLength(file, fileHeader.messageLength * 32, 32, 0); Modified: trunk/OpenMPT/soundlib/Load_xmf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_xmf.cpp Sun May 26 00:37:33 2024 (r20852) +++ trunk/OpenMPT/soundlib/Load_xmf.cpp Sun May 26 00:52:48 2024 (r20853) @@ -166,7 +166,7 @@ InitializeGlobals(MOD_TYPE_MOD); m_SongFlags.set(SONG_IMPORTED); m_SongFlags.reset(SONG_ISAMIGA); - m_SongFlags.set(SONG_AUTO_TONEPORTA, type < 4); + m_SongFlags.set(SONG_AUTO_TONEPORTA | SONG_AUTO_TONEPORTA_CONT, type < 4); m_nSamples = numSamples; m_nSamplePreAmp = (type == 3) ? 192 : 48; // Imperium Galactica files are really quiet, no other XMFs appear to use type 3 Modified: trunk/OpenMPT/soundlib/Snd_defs.h ============================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h Sun May 26 00:37:33 2024 (r20852) +++ trunk/OpenMPT/soundlib/Snd_defs.h Sun May 26 00:52:48 2024 (r20853) @@ -279,23 +279,24 @@ // Module flags - contains both song configuration and playback state... Use SONG_FILE_FLAGS and SONG_PLAY_FLAGS distinguish between the two. enum SongFlags { - SONG_FASTPORTAS = 0x01, // Portamentos are executed on every tick - SONG_FASTVOLSLIDES = 0x02, // Old Scream Tracker 3.0 volume slides (executed on every tick) - SONG_ITOLDEFFECTS = 0x04, // Old Impulse Tracker effect implementations - SONG_ITCOMPATGXX = 0x08, // IT "Compatible Gxx" (IT's flag to behave more like other trackers w/r/t portamento effects) - SONG_LINEARSLIDES = 0x10, // Linear slides vs. Amiga slides - SONG_EXFILTERRANGE = 0x20, // Cutoff Filter has double frequency range (up to ~10Khz) - SONG_AMIGALIMITS = 0x40, // Enforce amiga frequency limits - SONG_S3MOLDVIBRATO = 0x80, // ScreamTracker 2 vibrato in S3M files - SONG_PT_MODE = 0x100, // ProTracker 1/2 playback mode - SONG_ISAMIGA = 0x200, // Is an Amiga module and thus qualifies to be played using the Paula BLEP resampler - SONG_IMPORTED = 0x400, // Song type does not represent actual module format / was imported from a different format (OpenMPT) - SONG_PLAYALLSONGS = 0x800, // Play all subsongs consecutively (libopenmpt) - SONG_AUTO_TONEPORTA = 0x1000, // Tone portamento command is continued automatically - SONG_AUTO_GLOBALVOL = 0x2000, // Global volume slide command is continued automatically - SONG_AUTO_VIBRATO = 0x4000, // Vibrato command is continued automatically - SONG_AUTO_TREMOLO = 0x8000, // Tremolo command is continued automatically - SONG_AUTO_VOLSLIDE_STK = 0x1'0000, // Automatic volume slide command is interpreted like in STK files (rather than like in STP files) + SONG_FASTPORTAS = 0x01, // Portamentos are executed on every tick + SONG_FASTVOLSLIDES = 0x02, // Old Scream Tracker 3.0 volume slides (executed on every tick) + SONG_ITOLDEFFECTS = 0x04, // Old Impulse Tracker effect implementations + SONG_ITCOMPATGXX = 0x08, // IT "Compatible Gxx" (IT's flag to behave more like other trackers w/r/t portamento effects) + SONG_LINEARSLIDES = 0x10, // Linear slides vs. Amiga slides + SONG_EXFILTERRANGE = 0x20, // Cutoff Filter has double frequency range (up to ~10Khz) + SONG_AMIGALIMITS = 0x40, // Enforce amiga frequency limits + SONG_S3MOLDVIBRATO = 0x80, // ScreamTracker 2 vibrato in S3M files + SONG_PT_MODE = 0x100, // ProTracker 1/2 playback mode + SONG_ISAMIGA = 0x200, // Is an Amiga module and thus qualifies to be played using the Paula BLEP resampler + SONG_IMPORTED = 0x400, // Song type does not represent actual module format / was imported from a different format (OpenMPT) + SONG_PLAYALLSONGS = 0x800, // Play all subsongs consecutively (libopenmpt) + SONG_AUTO_TONEPORTA = 0x1000, // Tone portamento command is continued automatically + SONG_AUTO_TONEPORTA_CONT = 0x2000, // Auto tone portamento is not interruped by a tone portamento with parameter 0 + SONG_AUTO_GLOBALVOL = 0x4000, // Global volume slide command is continued automatically + SONG_AUTO_VIBRATO = 0x8000, // Vibrato command is continued automatically + SONG_AUTO_TREMOLO = 0x1'8000, // Tremolo command is continued automatically + SONG_AUTO_VOLSLIDE_STK = 0x2'0000, // Automatic volume slide command is interpreted like in STK files (rather than like in STP files) }; DECLARE_FLAGSET(SongFlags) Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp Sun May 26 00:37:33 2024 (r20852) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp Sun May 26 00:52:48 2024 (r20853) @@ -4366,7 +4366,7 @@ ModChannel &chn = playState.Chn[nChn]; chn.dwFlags.set(CHN_PORTAMENTO); if(m_SongFlags[SONG_AUTO_TONEPORTA]) - chn.autoSlide.SetActive(AutoSlideCommand::TonePortamento, param != 0); + chn.autoSlide.SetActive(AutoSlideCommand::TonePortamento, param != 0 || m_SongFlags[SONG_AUTO_TONEPORTA_CONT]); //IT compatibility 03: Share effect memory with portamento up/down if((!m_SongFlags[SONG_ITCOMPATGXX] && m_playBehaviour[kITPortaMemoryShare]) || GetType() == MOD_TYPE_PLM) |