FP8: limit fader range
In case of VCA masters or otherwise the value can exceed the max +6dB and internal_to_interface() returns a value > 1.0 which cannot be represented on the physical fader (MIDI &0x7f wraps)
This commit is contained in:
parent
55cd96df8d
commit
029e963fb5
@ -360,6 +360,7 @@ FP8Strip::notify_fader_changed ()
|
||||
float val = 0;
|
||||
if (ac) {
|
||||
val = ac->internal_to_interface (ac->get_value()) * 16368.f; /* 16 * 1023 */
|
||||
val = std::max (0.f, std::min (1.f, val));
|
||||
}
|
||||
unsigned short mv = lrintf (val);
|
||||
if (mv == _last_fader) {
|
||||
|
Loading…
Reference in New Issue
Block a user