From: <sag...@us...> - 2014-10-11 23:24:46
|
Revision: 4427 http://sourceforge.net/p/modplug/code/4427 Author: saga-games Date: 2014-10-11 23:24:33 +0000 (Sat, 11 Oct 2014) Log Message: ----------- [New] S70/S71/S72 commands do now also work with instrument plugins. [Fix] Playback: NNA/DCA were not applied properly to plugins assigned to sample-less instruments [Mod] OpenMPT: Version is now 1.24.00.09 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-10-11 22:35:48 UTC (rev 4426) +++ trunk/OpenMPT/common/versionNumber.h 2014-10-11 23:24:33 UTC (rev 4427) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 24 #define VER_MINOR 00 -#define VER_MINORMINOR 08 +#define VER_MINORMINOR 09 //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/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-10-11 22:35:48 UTC (rev 4426) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-10-11 23:24:33 UTC (rev 4427) @@ -973,7 +973,7 @@ pChn->nNewIns = 0; // IT Compatiblity: NNA is reset on every note change, not every instrument change (fixes s7xinsnum.it). - if (pIns && !IsCompatibleMode(TRK_IMPULSETRACKER) && (pIns->nMixPlug || pSmp)) //rewbs.VSTiNNA + if (pIns && ((!IsCompatibleMode(TRK_IMPULSETRACKER) && pSmp) || pIns->nMixPlug)) pChn->nNNA = pIns->nNNA; if (pSmp) @@ -1690,7 +1690,7 @@ IMixPlugin *pPlugin = m_MixPlugins[pIns->nMixPlug-1].pMixPlugin; if(pPlugin && p->nNote != NOTE_NONE) { - pPlugin->MidiCommand(GetBestMidiChannel(i), p->pModInstrument->nMidiProgram, p->pModInstrument->wMidiBank, p->nLastNote + NOTE_MAX_SPECIAL, 0, i); + pPlugin->MidiCommand(GetBestMidiChannel(i), p->pModInstrument->nMidiProgram, p->pModInstrument->wMidiBank, p->nNote + NOTE_MAX_SPECIAL, 0, i); } break; } @@ -1780,7 +1780,7 @@ case NNA_NOTEFADE: //switch off note played on this plugin, on this tracker channel and midi channel //pPlugin->MidiCommand(pChn->pModInstrument->nMidiChannel, pChn->pModInstrument->nMidiProgram, pChn->nNote + NOTE_MAX_SPECIAL, 0, n); - pPlugin->MidiCommand(GetBestMidiChannel(nChn), pChn->pModInstrument->nMidiProgram, pChn->pModInstrument->wMidiBank, /*pChn->nNote+*/NOTE_MAX_SPECIAL, 0, nChn); + pPlugin->MidiCommand(GetBestMidiChannel(nChn), pChn->pModInstrument->nMidiProgram, pChn->pModInstrument->wMidiBank, NOTE_KEYOFF, 0, nChn); break; } } @@ -3867,6 +3867,12 @@ bkp->dwFlags.set(CHN_NOTEFADE); bkp->nFadeOutVol = 0; } + const ModInstrument *pIns = bkp->pModInstrument; + IMixPlugin *pPlugin; + if(pIns != nullptr && pIns->nMixPlug && (pPlugin = m_MixPlugins[pIns->nMixPlug - 1].pMixPlugin) != nullptr) + { + pPlugin->MidiCommand(GetBestMidiChannel(nChn), pIns->nMidiProgram, pIns->wMidiBank, bkp->nNote + NOTE_MAX_SPECIAL, 0, nChn); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |