mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 05:36:31 +01:00
Maintain correct tracker state on MIDI overwrite.
This is a little hard-edged in that edits while rolling will prematurely chop off any playing notes, but at least the state of things actually reflects reality. More sophisticated solution hopefully to come...
This commit is contained in:
parent
db92d62c95
commit
5d8021bf44
7 changed files with 44 additions and 14 deletions
|
|
@ -282,13 +282,8 @@ SMFSource::read_unlocked (const Lock& lock,
|
|||
|
||||
if (ev_frame_time < start + duration) {
|
||||
destination.write (ev_frame_time, ev_type, ev_size, ev_buffer);
|
||||
|
||||
if (tracker) {
|
||||
if (ev_buffer[0] & MIDI_CMD_NOTE_ON) {
|
||||
tracker->add (ev_buffer[1], ev_buffer[0] & 0xf);
|
||||
} else if (ev_buffer[0] & MIDI_CMD_NOTE_OFF) {
|
||||
tracker->remove (ev_buffer[1], ev_buffer[0] & 0xf);
|
||||
}
|
||||
tracker->track(ev_buffer);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue