From: <sag...@us...> - 2015-02-15 00:19:22
|
Revision: 4757 http://sourceforge.net/p/modplug/code/4757 Author: saga-games Date: 2015-02-15 00:19:09 +0000 (Sun, 15 Feb 2015) Log Message: ----------- [Fix] Pattern tab: Note-offs from past notes are no longer written when recording notes into patterns (http://bugs.openmpt.org/view.php?id=645) [Mod] OpenMPT: Version is now 1.24.01.09 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2015-02-14 14:36:58 UTC (rev 4756) +++ trunk/OpenMPT/common/versionNumber.h 2015-02-15 00:19:09 UTC (rev 4757) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 24 #define VER_MINOR 01 -#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/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2015-02-14 14:36:58 UTC (rev 4756) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2015-02-15 00:19:09 UTC (rev 4757) @@ -173,6 +173,7 @@ MemsetZero(OldVUMeters); // -> CODE#0012 // -> DESC="midi keyboard split" + memset(previousNote, NOTE_NONE, sizeof(previousNote)); memset(splitActiveNoteChannel, 0xFF, sizeof(splitActiveNoteChannel)); memset(activeNoteChannel, 0xFF, sizeof(activeNoteChannel)); m_nPlayPat = PATTERNINDEX_INVALID; @@ -4854,6 +4855,7 @@ const CHANNELINDEX nChn = bChordMode ? chordPatternChannels[0] : (activeNoteMap[note] < sndFile.GetNumChannels() ? activeNoteMap[note] : nChnCursor); CHANNELINDEX noteChannels[MPTChord::notesPerChord] = { nChn }; + ModCommand::NOTE notes[MPTChord::notesPerChord] = { note }; int numNotes = 1; if(pModDoc) @@ -4875,7 +4877,6 @@ { m_Status.reset(psChordPlaying); - ModCommand::NOTE notes[4]; numNotes = ConstructChord(note, notes, prevChordBaseNote); if(!numNotes) { @@ -4944,6 +4945,11 @@ for(int i = 0; i < numNotes; i++) { + if(previousNote[noteChannels[i]] != notes[i]) + { + // This might be a note-off from a past note, but since we already hit a new note on this channel, we ignore it. + continue; + } ModCommand *pTarget = sndFile.Patterns[editPos.pattern].GetpModCommand(editPos.row, noteChannels[i]); // -- write sdx if playing live @@ -5300,6 +5306,11 @@ } } + if(newcmd.IsNote()) + { + previousNote[nChn] = note; + } + // -- if recording, handle post note entry behaviour (move cursor etc..) if(recordEnabled) { @@ -5485,7 +5496,7 @@ chordPatternChannels[i] = curChn; ModCommand &m = newRow[curChn]; - m.note = chordNotes[i]; + previousNote[curChn] = m.note = chordNotes[i]; if(newRow[chn].instr) { m.instr = newRow[chn].instr; Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2015-02-14 14:36:58 UTC (rev 4756) +++ trunk/OpenMPT/mptrack/View_pat.h 2015-02-15 00:19:09 UTC (rev 4757) @@ -201,6 +201,7 @@ WORD ChnVUMeters[MAX_BASECHANNELS]; WORD OldVUMeters[MAX_BASECHANNELS]; + ModCommand::NOTE previousNote[MAX_BASECHANNELS]; BYTE activeNoteChannel[NOTE_MAX + NOTE_MIN]; BYTE splitActiveNoteChannel[NOTE_MAX + NOTE_MIN]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |