13
0

Update GUI, use new write_immediate_event() API

This commit is contained in:
Robin Gareus 2020-09-20 00:59:23 +02:00
parent 2f68656679
commit c5d7ed3015
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 18 additions and 18 deletions

View File

@ -781,15 +781,15 @@ GenericPluginUI::midi_bank_patch_select (uint8_t chn, uint32_t bankpgm)
event[0] = (MIDI_CMD_CONTROL | chn);
event[1] = 0x00;
event[2] = bank >> 7;
insert->write_immediate_event (3, event);
insert->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
event[1] = 0x20;
event[2] = bank & 127;
insert->write_immediate_event (3, event);
insert->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
event[0] = (MIDI_CMD_PGM_CHANGE | chn);
event[1] = pgm;
insert->write_immediate_event (2, event);
insert->write_immediate_event (Evoral::MIDI_EVENT, 2, event);
}
}
@ -1354,9 +1354,9 @@ GenericPluginUI::note_on_event_handler (int note, int)
event[1] = note;
event[2] = _piano_velocity.get_value_as_int ();
if (mt) {
mt->write_immediate_event (3, event);
mt->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
} else {
insert->write_immediate_event (3, event);
insert->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
}
}
@ -1370,8 +1370,8 @@ GenericPluginUI::note_off_event_handler (int note)
event[1] = note;
event[2] = 0;
if (mt) {
mt->write_immediate_event (3, event);
mt->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
} else {
insert->write_immediate_event (3, event);
insert->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
}
}

View File

@ -54,7 +54,7 @@ void
NotePlayer::on ()
{
for (Notes::iterator n = notes.begin(); n != notes.end(); ++n) {
track->write_immediate_event ((*n)->on_event().size(), (*n)->on_event().buffer());
track->write_immediate_event (Evoral::MIDI_EVENT, (*n)->on_event().size(), (*n)->on_event().buffer());
}
}
@ -84,6 +84,6 @@ void
NotePlayer::off ()
{
for (Notes::iterator n = notes.begin(); n != notes.end(); ++n) {
track->write_immediate_event ((*n)->off_event().size(), (*n)->off_event().buffer());
track->write_immediate_event (Evoral::MIDI_EVENT, (*n)->off_event().size(), (*n)->off_event().buffer());
}
}

View File

@ -395,11 +395,11 @@ PatchChangeWidget::select_bank (uint32_t bank)
event[0] = (MIDI_CMD_CONTROL | _channel);
event[1] = 0x00;
event[2] = bank >> 7;
pi->write_immediate_event (3, event);
pi->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
event[1] = 0x20;
event[2] = bank & 127;
pi->write_immediate_event (3, event);
pi->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
}
select_program (program (_channel));
@ -424,7 +424,7 @@ PatchChangeWidget::select_program (uint8_t pgm)
uint8_t event[2];
event[0] = (MIDI_CMD_PGM_CHANGE | _channel);
event[1] = pgm;
pi->write_immediate_event (2, event);
pi->write_immediate_event (Evoral::MIDI_EVENT, 2, event);
}
audition ();
@ -573,9 +573,9 @@ PatchChangeWidget::note_on_event_handler (int note, bool for_audition)
_audition_note_num = note;
if (boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (_route)) {
mt->write_immediate_event (3, event);
mt->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
} else if (boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (_route->the_instrument())) {
pi->write_immediate_event (3, event);
pi->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
}
}
@ -589,9 +589,9 @@ PatchChangeWidget::note_off_event_handler (int note)
_audition_note_on = false;
if (boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (_route)) {
mt->write_immediate_event (3, event);
mt->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
} else if (boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (_route->the_instrument())) {
pi->write_immediate_event (3, event);
pi->write_immediate_event (Evoral::MIDI_EVENT, 3, event);
}
}

View File

@ -692,7 +692,7 @@ PianoRollHeader::send_note_on (uint8_t note)
_event[1] = note;
_event[2] = 100;
track->write_immediate_event (3, _event);
track->write_immediate_event (Evoral::MIDI_EVENT, 3, _event);
}
}
@ -707,7 +707,7 @@ PianoRollHeader::send_note_off (uint8_t note)
_event[1] = note;
_event[2] = 100;
track->write_immediate_event (3, _event);
track->write_immediate_event (Evoral::MIDI_EVENT, 3, _event);
}
}