mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
MIDI Draw: change behavior regarding MIDI Channel of new notes
When adding a note, use these criteria to choose the channel number: * if the user has explicitly specified a note in the pulldown, use that * if the user has AUTO selected and we are in a region, choose the nearest note's channel (consistent with velocity behavior) * as a fallback, query the track for its channel-filter (old behavior)
This commit is contained in:
parent
eebf3717e3
commit
252ae56a08
7 changed files with 38 additions and 10 deletions
|
|
@ -688,7 +688,7 @@ PianoRollHeader::send_note_on (uint8_t note)
|
|||
//cerr << "note on: " << (int) note << endl;
|
||||
|
||||
if (track) {
|
||||
_event[0] = (MIDI_CMD_NOTE_ON | mtv->get_channel_for_add ());
|
||||
_event[0] = (MIDI_CMD_NOTE_ON | mtv->get_preferred_midi_channel ());
|
||||
_event[1] = note;
|
||||
_event[2] = 100;
|
||||
|
||||
|
|
@ -703,7 +703,7 @@ PianoRollHeader::send_note_off (uint8_t note)
|
|||
MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*> (&_view.trackview ());
|
||||
|
||||
if (track) {
|
||||
_event[0] = (MIDI_CMD_NOTE_OFF | mtv->get_channel_for_add ());
|
||||
_event[0] = (MIDI_CMD_NOTE_OFF | mtv->get_preferred_midi_channel ());
|
||||
_event[1] = note;
|
||||
_event[2] = 100;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue