From: Steinar H. Gunderson Date: Fri, 4 Jan 2019 21:37:00 +0000 (+0100) Subject: Send note velocity of 1 instead of 127 for lights. X-Git-Tag: 1.8.2~37 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=94fdba22fd7e9b73861293e5c0ae735b8e99c0b6;p=nageru Send note velocity of 1 instead of 127 for lights. Seemingly at least the Behringer PL-1 isn't happy about 127; it has 0 for off (well, default color), 1 for on, 2 for blink, and ignores all others. 1 should be fine for other devices as far as I know, so simply make it universal. --- diff --git a/nageru/midi_mapper.cpp b/nageru/midi_mapper.cpp index 3b22192..e858603 100644 --- a/nageru/midi_mapper.cpp +++ b/nageru/midi_mapper.cpp @@ -638,7 +638,7 @@ void MIDIMapper::update_lights_lock_held() // For some reason, not all devices respond to note off. // Use note-on with velocity of 0 (which is equivalent) instead. - snd_seq_ev_set_noteon(&ev, /*channel=*/0, note_num, active ? 127 : 0); + snd_seq_ev_set_noteon(&ev, /*channel=*/0, note_num, active ? 1 : 0); WARN_ON_ERROR("snd_seq_event_output", snd_seq_event_output(alsa_seq, &ev)); current_light_status[note_num] = active; }