From: <sag...@us...> - 2015-01-11 17:34:22
|
Revision: 4712 http://sourceforge.net/p/modplug/code/4712 Author: saga-games Date: 2015-01-11 17:34:09 +0000 (Sun, 11 Jan 2015) Log Message: ----------- [Fix] Sample tab: Splitting a stereo sample into two mono samples didn't update the sample list in other tabs. [Fix] IT Compatibility: Panbrello should not reset until the next note or panning command (test case: PanbrelloHold.it) [Mod] OpenMPT: Version is now 1.24.01.06 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2015-01-10 18:53:02 UTC (rev 4711) +++ trunk/OpenMPT/common/versionNumber.h 2015-01-11 17:34:09 UTC (rev 4712) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 24 #define VER_MINOR 01 -#define VER_MINORMINOR 05 +#define VER_MINORMINOR 06 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2015-01-10 18:53:02 UTC (rev 4711) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2015-01-11 17:34:09 UTC (rev 4712) @@ -2349,7 +2349,7 @@ right.nPan = 256; } } - SetModified(SampleHint().Info().Data(), true, true); + SetModified(SampleHint().Info().Data().Names(), true, true); } else { pModDoc->GetSampleUndo().RemoveLastUndoStep(m_nSample); @@ -2934,7 +2934,7 @@ case kcSampleCenterSustainEnd: if(m_nZoom) { - SmpLength point; + SmpLength point = 0; ModSample &sample = sndFile.GetSample(m_nSample); switch(wParam) { Modified: trunk/OpenMPT/soundlib/ModChannel.h =================================================================== --- trunk/OpenMPT/soundlib/ModChannel.h 2015-01-10 18:53:02 UTC (rev 4711) +++ trunk/OpenMPT/soundlib/ModChannel.h 2015-01-11 17:34:09 UTC (rev 4712) @@ -97,7 +97,7 @@ uint8 nVibratoType, nVibratoSpeed, nVibratoDepth; uint8 nTremoloType, nTremoloSpeed, nTremoloDepth; uint8 nPanbrelloType, nPanbrelloSpeed, nPanbrelloDepth; - int8 nPanbrelloRandomMemory; + int8 nPanbrelloOffset, nPanbrelloRandomMemory; uint8 nOldCmdEx, nOldVolParam, nOldTempo; uint8 nOldOffset, nOldHiOffset; uint8 nCutOff, nResonance; Modified: trunk/OpenMPT/soundlib/Snd_defs.h =================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h 2015-01-10 18:53:02 UTC (rev 4711) +++ trunk/OpenMPT/soundlib/Snd_defs.h 2015-01-11 17:34:09 UTC (rev 4712) @@ -149,7 +149,7 @@ CHN_VOLUMERAMP = 0x8000, // Apply volume ramping CHN_VIBRATO = 0x10000, // Apply vibrato CHN_TREMOLO = 0x20000, // Apply tremolo - CHN_PANBRELLO = 0x40000, // Apply panbrello + //CHN_PANBRELLO = 0x40000, // Apply panbrello CHN_PORTAMENTO = 0x80000, // Apply portamento CHN_GLISSANDO = 0x100000, // Glissando mode CHN_FASTVOLRAMP = 0x200000, // Force usage of global ramping settings instead of ramping over the complete render buffer length Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-01-10 18:53:02 UTC (rev 4711) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-01-11 17:34:09 UTC (rev 4712) @@ -98,13 +98,8 @@ // Get mod length in various cases. Parameters: // [in] adjustMode: See enmGetLengthResetMode for possible adjust modes. -// [in] target: Time or position target which should be reached, or no target to get length of the first sub song. -// [out] duration: total time in seconds -// [out] targetReached: true if the specified target has been reached while going through the module. -// [out] lastOrder: last parsed order (if no target is specified, this is the first order that is parsed twice, i.e. not the *last* played order) -// [out] lastRow: last parsed row (ditto) -// [out] endOrder: last order before module loops (UNDEFINED if a target is specified) -// [out] endRow: last row before module loops (ditto) +// [in] target: Time or position target which should be reached, or no target to get length of the first sub song. Use GetLengthTarget::StartPos to also specify a position from where the seeking should begin. +// [out] See definition of type GetLengthType for the returned values. std::vector<GetLengthType> CSoundFile::GetLength(enmGetLengthResetMode adjustMode, GetLengthTarget target) //-------------------------------------------------------------------------------------------------------- { @@ -1158,8 +1153,6 @@ if(pIns->IsCutoffEnabled()) pChn->nCutOff = pIns->GetCutoff(); if(pIns->IsResonanceEnabled()) pChn->nResonance = pIns->GetResonance(); } - pChn->nVolSwing = pChn->nPanSwing = 0; - pChn->nResSwing = pChn->nCutSwing = 0; } if(pSmp == nullptr) @@ -1349,6 +1342,7 @@ pChn->nNewIns = 0; UINT period = GetPeriodFromNote(note, pChn->nFineTune, pChn->nC5Speed); + pChn->nPanbrelloOffset = 0; if(!pSmp) return; if(period) @@ -1627,7 +1621,8 @@ ModChannel &chn = m_PlayState.Chn[n]; // Copy Channel chn = *pChn; - chn.dwFlags.reset(CHN_VIBRATO | CHN_TREMOLO | CHN_PANBRELLO | CHN_MUTE | CHN_PORTAMENTO); + chn.dwFlags.reset(CHN_VIBRATO | CHN_TREMOLO | CHN_MUTE | CHN_PORTAMENTO); + chn.nPanbrelloOffset = 0; chn.nMasterChn = nChn + 1; chn.nCommand = CMD_NONE; chn.rowCommand.Clear(); @@ -1792,7 +1787,8 @@ ModChannel *p = &m_PlayState.Chn[n]; // Copy Channel *p = *pChn; - p->dwFlags.reset(CHN_VIBRATO | CHN_TREMOLO | CHN_PANBRELLO | CHN_MUTE | CHN_PORTAMENTO); + p->dwFlags.reset(CHN_VIBRATO | CHN_TREMOLO | CHN_MUTE | CHN_PORTAMENTO); + p->nPanbrelloOffset = 0; //rewbs: Copy mute and FX status from master chan. //I'd like to copy other flags too, but this would change playback behaviour. @@ -2349,7 +2345,10 @@ pChn->nRestorePanOnNewNote = 0; //IT compatibility 20. Set pan overrides random pan if(IsCompatibleMode(TRK_IMPULSETRACKER)) + { pChn->nPanSwing = 0; + pChn->nPanbrelloOffset = 0; + } } #ifdef MODPLUG_TRACKER @@ -3453,7 +3452,6 @@ { if (param & 0x0F) p->nPanbrelloDepth = param & 0x0F; if (param & 0xF0) p->nPanbrelloSpeed = (param >> 4) & 0x0F; - p->dwFlags.set(CHN_PANBRELLO); } @@ -3484,7 +3482,10 @@ pChn->nRestorePanOnNewNote = 0; //IT compatibility 20. Set pan overrides random pan if(IsCompatibleMode(TRK_IMPULSETRACKER)) + { pChn->nPanSwing = 0; + pChn->nPanbrelloOffset = 0; + } } @@ -3946,6 +3947,7 @@ if(IsCompatibleMode(TRK_IMPULSETRACKER)) { pChn->nPanSwing = 0; + pChn->nPanbrelloOffset = 0; } } break; Modified: trunk/OpenMPT/soundlib/Sndmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp 2015-01-10 18:53:02 UTC (rev 4711) +++ trunk/OpenMPT/soundlib/Sndmix.cpp 2015-01-11 17:34:09 UTC (rev 4712) @@ -598,7 +598,8 @@ pChn->rightVol = pChn->newRightVol; pChn->leftVol = pChn->newLeftVol; - pChn->dwFlags.reset(CHN_VIBRATO | CHN_TREMOLO | CHN_PANBRELLO); + pChn->dwFlags.reset(CHN_VIBRATO | CHN_TREMOLO); + if(!IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nPanbrelloOffset = 0; pChn->nCommand = CMD_NONE; pChn->m_plugParamValueStep = 0; } @@ -1174,7 +1175,8 @@ void CSoundFile::ProcessPanbrello(ModChannel *pChn) const //------------------------------------------------------- { - if(pChn->dwFlags[CHN_PANBRELLO]) + int pdelta = pChn->nPanbrelloOffset; + if(pChn->rowCommand.command == CMD_PANBRELLO) { uint32 panpos; // IT compatibility: IT has its own, more precise tables @@ -1183,7 +1185,7 @@ else panpos = ((pChn->nPanbrelloPos + 0x10) >> 2) & 0x3F; - int pdelta = GetVibratoDelta(pChn->nPanbrelloType, panpos); + pdelta = GetVibratoDelta(pChn->nPanbrelloType, panpos); // IT compatibility: Sample-and-hold style random panbrello (tremolo and vibrato don't use this mechanism in IT) // Test case: RandomWaveform.it @@ -1200,12 +1202,18 @@ { pChn->nPanbrelloPos += pChn->nPanbrelloSpeed; } - + // IT compatibility: Panbrello effect is active until next note or panning command. + // Test case: PanbrelloHold.it + if(IsCompatibleMode(TRK_IMPULSETRACKER)) + { + pChn->nPanbrelloOffset = static_cast<int8>(pdelta); + } + } + if(pdelta) + { pdelta = ((pdelta * (int)pChn->nPanbrelloDepth) + 2) >> 3; pdelta += pChn->nRealPan; - pChn->nRealPan = Clamp(pdelta, 0, 256); - //if(IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nPan = pChn->nRealPan; // TODO } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |