X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shared%2Fmidi_device.cpp;h=ac0fea271d12d8837d3f53a3fe67d3eed22819c2;hb=beead04c23b42c815f448cd0126d87f9627bbfde;hp=822beaeadbd4d95b3a03fe294c3da069603953e5;hpb=9c29ca89b638194f5771c22fadf6bf490d4595a3;p=nageru diff --git a/shared/midi_device.cpp b/shared/midi_device.cpp index 822beae..ac0fea2 100644 --- a/shared/midi_device.cpp +++ b/shared/midi_device.cpp @@ -160,6 +160,11 @@ void MIDIDevice::handle_event(snd_seq_t *seq, snd_seq_event_t *event) receiver->controller_received(event->data.control.param, event->data.control.value); break; } + case SND_SEQ_EVENT_PITCHBEND: { + // Note, -8192 to 8191 instead of 0 to 127. + receiver->controller_received(MIDIReceiver::PITCH_BEND_CONTROLLER, event->data.control.value); + break; + } case SND_SEQ_EVENT_NOTEON: { receiver->note_on_received(event->data.note.note); break; @@ -245,7 +250,7 @@ void MIDIDevice::update_lights_lock_held(const set &active_lights) } unsigned num_events = 0; - for (unsigned note_num = 1; note_num <= 127; ++note_num) { + for (unsigned note_num = 1; note_num <= 127; ++note_num) { // Note: Pitch bend is ignored. bool active = active_lights.count(note_num); if (current_light_status.count(note_num) && current_light_status[note_num] == active) {