From: <sv...@op...> - 2024-10-27 12:15:41
|
Author: sagamusix Date: Sun Oct 27 13:15:28 2024 New Revision: 22001 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22001 Log: [Imp] MOD: When converting sample to MOD, zero the lower 4 bits, as they won't be saved anyway. [Imp] MOD: Improve handling of tranpose = -1 / finetune = 0 case when converting sample from another format. Modified: trunk/OpenMPT/soundlib/ModSample.cpp Modified: trunk/OpenMPT/soundlib/ModSample.cpp ============================================================================== --- trunk/OpenMPT/soundlib/ModSample.cpp Sun Oct 27 13:14:11 2024 (r22000) +++ trunk/OpenMPT/soundlib/ModSample.cpp Sun Oct 27 13:15:28 2024 (r22001) @@ -42,6 +42,13 @@ nC5Speed = Util::muldivr_unsigned(nC5Speed, 8363, 8287); FrequencyToTranspose(); } + if(toType == MOD_TYPE_MOD) + { + if(RelativeTone == -1 && nFineTune == 0) + nFineTune = -128; + RelativeTone = 0; + nFineTune &= ~0x0F; + } // No ping-pong loop, panning and auto-vibrato for MOD / S3M samples if(toType & (MOD_TYPE_MOD | MOD_TYPE_S3M)) @@ -52,8 +59,6 @@ nVibRate = 0; nVibSweep = 0; nVibType = VIB_SINE; - - RelativeTone = 0; } // No global volume / sustain loops for MOD/S3M/XM @@ -86,7 +91,6 @@ LimitMax(nVibRate, uint8(63)); } - // Autovibrato sweep setting is inverse in XM (0 = "no sweep") and IT (0 = "no vibrato") if(((fromType & MOD_TYPE_XM) && (toType & (MOD_TYPE_IT | MOD_TYPE_MPT))) || ((toType & MOD_TYPE_XM) && (fromType & (MOD_TYPE_IT | MOD_TYPE_MPT)))) { |