Less confusing when in an UI, and also doesn't require us to have
some spinners at max 127 and some at max 128 (save for pitch bend).
master_speed: { controller_number: 128 }
master_speed_light: { controller_number: 10 }
master_speed_light_min: 1
-master_speed_light_max: 16
+master_speed_light_max: 15
# Master speed lock is mapped to lock.
toggle_lock: { note_number: 25 }
optional int32 master_speed_bank = 35;
optional MIDIControllerProto master_speed_light = 42; // NOTE: Controller, not light.
optional int32 master_speed_light_min = 43;
- optional int32 master_speed_light_max = 44 [default=128]; // Exclusive.
+ optional int32 master_speed_light_max = 44 [default=127]; // Inclusive.
// Buttons.
optional MIDIButtonProto preview = 18;
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;
}