X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nonlinear_fader.cpp;h=61317e0acfc0c5c9ba2e871d421e483b6df73b27;hb=937b6ab9e4c5d13fe7f7bdcb5a17bf48929f44ce;hp=b548c29493206bc6f5a3569ffc657f55f4178550;hpb=adaf88f2a3544bfd62bcdafa9b11d190f6658010;p=nageru diff --git a/nonlinear_fader.cpp b/nonlinear_fader.cpp index b548c29..61317e0 100644 --- a/nonlinear_fader.cpp +++ b/nonlinear_fader.cpp @@ -17,8 +17,11 @@ namespace { vector> fader_control_points = { // The main area is from +6 to -12 dB (18 dB), and we use half the slider range for it. + // Adjust slightly so that the MIDI controller value of 106 becomes exactly 0.0 dB + // (cf. map_controller_to_float()); otherwise, we'd miss ever so slightly, which is + // really frustrating. { 6.0, 1.0 }, - { -12.0, 0.5 }, + { -12.0, 1.0 - (1.0 - 106.5/127.0) * 3.0 }, // About 0.492. // -12 to -21 is half the range (9 dB). Halve. { -21.0, 0.325 },