X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fmidi_state_tracker.cc;h=4374c064635fa47d61d3d985e1136df1ec60dc10;hb=5103663f13fcce6797aa04d8c752d90bb7d5fe74;hp=884d1e16f07e63e59ecac1ad0e22a974ad1b9224;hpb=94e0a15325278ec26dbeba4990a0e883db859338;p=ardour.git diff --git a/libs/ardour/midi_state_tracker.cc b/libs/ardour/midi_state_tracker.cc index 884d1e16f0..4374c06463 100644 --- a/libs/ardour/midi_state_tracker.cc +++ b/libs/ardour/midi_state_tracker.cc @@ -122,8 +122,8 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time) for (int note = 0; note < 128; ++note) { while (_active_notes[note + 128 * channel]) { uint8_t buffer[3] = { ((uint8_t) (MIDI_CMD_NOTE_OFF | channel)), uint8_t (note), 0 }; - Evoral::MIDIEvent noteoff - (MIDI_CMD_NOTE_OFF, time, 3, buffer, false); + Evoral::Event noteoff + (Evoral::MIDI_EVENT, time, 3, buffer, false); /* note that we do not care about failure from push_back() ... should we warn someone ? */ @@ -157,7 +157,7 @@ MidiStateTracker::resolve_notes (Evoral::EventSink &dst, framepos_t /* note that we do not care about failure from write() ... should we warn someone ? */ - dst.write (time, midi_parameter_type (buf[0]), 3, buf); + dst.write (time, Evoral::MIDI_EVENT, 3, buf); _active_notes[note + 128 * channel]--; DEBUG_TRACE (PBD::DEBUG::MidiTrackers, string_compose ("%1: EVS-resolved note %2/%3 at %4\n", this, (int) note, (int) channel, time)); @@ -181,7 +181,7 @@ MidiStateTracker::resolve_notes (MidiSource& src, const MidiSource::Lock& lock, for (int channel = 0; channel < 16; ++channel) { for (int note = 0; note < 128; ++note) { while (_active_notes[note + 128 * channel]) { - Evoral::MIDIEvent ev ((MIDI_CMD_NOTE_OFF|channel), time, 3, 0, true); + Evoral::Event ev (Evoral::MIDI_EVENT, time, 3, 0, true); ev.set_type (MIDI_CMD_NOTE_OFF); ev.set_channel (channel); ev.set_note (note); @@ -206,7 +206,7 @@ MidiStateTracker::dump (ostream& o) for (int x = 0; x < 128; ++x) { if (_active_notes[c * 128 + x]) { o << "Channel " << c+1 << " Note " << x << " is on (" - << (int) _active_notes[c*128+x] << "times)\n"; + << (int) _active_notes[c*128+x] << " times)\n"; } } }