From 94fdba22fd7e9b73861293e5c0ae735b8e99c0b6 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 4 Jan 2019 22:37:00 +0100 Subject: [PATCH] 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. --- nageru/midi_mapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2