View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001622 | OpenMPT | Feature Request | public | 2022-08-11 16:06 | 2022-08-14 20:45 |
Reporter | dem1 | Assigned To | Saga Musix | ||
Priority | low | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 7 |
Product Version | OpenMPT 1.31.00.* (old testing) | ||||
Target Version | OpenMPT 1.30.06.00 / libopenmpt 0.6.5 (upgrade first) | Fixed in Version | OpenMPT 1.30.06.00 / libopenmpt 0.6.5 (upgrade first) | ||
Summary | 0001622: PC Notes multi-channel recording | ||||
Description | Currently, if multiple parameters change simultaneously, only the parameter with the highest index has its value recorded into the pattern. | ||||
Additional Information | From this forum thread: | ||||
Tags | No tags attached. | ||||
Has the bug occurred in previous versions? | |||||
Tested code revision (in case you know it) | |||||
I forgot to reinstall TortoiseSVN before I started working on this from the GitHub mirror. 1622.diff (1,550 bytes)
diff --git mptrack/View_pat.cpp mptrack/View_pat.cpp index 80b60b14c..1ccbaafdb 100644 --- mptrack/View_pat.cpp +++ mptrack/View_pat.cpp @@ -3553,9 +3553,10 @@ LRESULT CViewPattern::OnRecordPlugParamChange(WPARAM plugSlot, LPARAM paramIndex return 0; CSoundFile &sndFile = pModDoc->GetSoundFile(); + const bool isLiveRecord = IsLiveRecord(); //Work out where to put the new data - const PatternEditPos editPos = GetEditPos(sndFile, IsLiveRecord()); + const PatternEditPos editPos = GetEditPos(sndFile, isLiveRecord); const CHANNELINDEX chn = editPos.channel; const ROWINDEX row = editPos.row; const PATTERNINDEX pattern = editPos.pattern; @@ -3574,11 +3575,24 @@ LRESULT CViewPattern::OnRecordPlugParamChange(WPARAM plugSlot, LPARAM paramIndex { // MPTM: Use PC Notes + // only overwrite existing PC Notes if(m.IsEmpty() || m.IsPcNote()) { m.Set(NOTE_PCS, static_cast<ModCommand::INSTR>(plugSlot + 1), static_cast<uint16>(paramIndex), static_cast<uint16>(pPlug->GetParameter(static_cast<PlugParamIndex>(paramIndex)) * ModCommand::maxColumnValue)); } + + //PC Note multi-channel recording, issue 1622 + auto recordGroup = pModDoc->GetChannelRecordGroup(chn); + if(isLiveRecord && recordGroup != RecordGroup::NoGroup) + { + auto newChannel = FindGroupRecordChannel(recordGroup, false, chn + 1); + if (newChannel != CHANNELINDEX_INVALID) + { + SetCurrentColumn(newChannel); + } + } + } else if(sndFile.GetModSpecifications().HasCommand(CMD_SMOOTHMIDI)) { // Other formats: Use MIDI macros |
|
The idea is a good start but I would want this feature to work in a bit more structured way rather than randomly spraying PC events over all the channels. Optimally, if a specific parameter was already recorded on a previous row, the same channel should be tried again. |
|
Can you check how r17730 works for you? Like with regular multichannel recording, the edit cursor must already be placed on a recording-enabled channel for this feature to kick in. This version also works with PC events recorded via MIDI Mapping. |
|
It's working great! I like this approach. |
|
It's difficult to say because I have no idea if anyone is even using the second record group feature at all. But good point, it should probably respect whatever record group the cursor is currently in for consistency. |
|
This change has been applied and everyhing was backported to OpenMPT 1.30. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2022-08-11 16:06 | dem1 | New Issue | |
2022-08-11 21:54 | dem1 | Note Added: 0005264 | |
2022-08-11 21:54 | dem1 | File Added: 1622.diff | |
2022-08-12 19:26 | Saga Musix | Note Added: 0005266 | |
2022-08-14 12:58 | Saga Musix | Assigned To | => Saga Musix |
2022-08-14 12:58 | Saga Musix | Status | new => assigned |
2022-08-14 13:03 | Saga Musix | Note Added: 0005274 | |
2022-08-14 13:03 | Saga Musix | Status | assigned => feedback |
2022-08-14 19:23 | dem1 | Note Added: 0005281 | |
2022-08-14 19:23 | dem1 | Status | feedback => assigned |
2022-08-14 19:25 | Saga Musix | Note Added: 0005282 | |
2022-08-14 20:45 | Saga Musix | Note Added: 0005284 | |
2022-08-14 20:45 | Saga Musix | Status | assigned => resolved |
2022-08-14 20:45 | Saga Musix | Resolution | open => fixed |
2022-08-14 20:45 | Saga Musix | Fixed in Version | => OpenMPT 1.30.06.00 / libopenmpt 0.6.5 (upgrade first) |
2022-08-14 20:45 | Saga Musix | Target Version | => OpenMPT 1.30.06.00 / libopenmpt 0.6.5 (upgrade first) |