X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmidi_mapper.cpp;h=1d5d79e4ba85e9d9388f73bd94ecdc60d7840281;hb=9921f1fe12f5a7dadab7e84069fa8591d5c5663d;hp=c675820fb3a40ef3a3244818a0fdb249a5460858;hpb=6da5e74d3e13c307de29bd540ff4ce8371000efd;p=nageru diff --git a/futatabi/midi_mapper.cpp b/futatabi/midi_mapper.cpp index c675820..1d5d79e 100644 --- a/futatabi/midi_mapper.cpp +++ b/futatabi/midi_mapper.cpp @@ -251,7 +251,7 @@ void MIDIMapper::update_lights_lock_held() unsigned controller = mapping_proto->master_speed_light().controller_number(); unsigned min = mapping_proto->master_speed_light_min(); unsigned max = mapping_proto->master_speed_light_max(); - int speed_light_value = lrintf((max - min - 1) * current_speed / 2.0f) + min; + int speed_light_value = lrintf((max - min) * current_speed / 2.0f) + min; active_lights[MIDIDevice::LightKey{MIDIDevice::LightKey::CONTROLLER, controller}] = speed_light_value; }