From cf790d239d4b5dfa772d5d1fdb112b8640a4a81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 2 May 2020 12:21:16 +0200 Subject: Add powermap functionality to the engine for mapping input velocities through a Monotone cubic splines due to Steffen. --- src/settings.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'src/settings.h') diff --git a/src/settings.h b/src/settings.h index 9fa3896..a3d21d0 100644 --- a/src/settings.h +++ b/src/settings.h @@ -144,6 +144,20 @@ struct Settings // Current latency offset in ms - for UI Atomic latency_current{0}; + // Powermap parameters + Atomic enable_powermap; + Atomic powermap_fixed0_x{0.}; + Atomic powermap_fixed0_y{0.}; + Atomic powermap_fixed1_x{.5}; + Atomic powermap_fixed1_y{.5}; + Atomic powermap_fixed2_x{1.}; + Atomic powermap_fixed2_y{1.}; + Atomic powermap_shelf{true}; + + // Powermap visualizer; -1 is "none" + Atomic powermap_input{-1.}; + Atomic powermap_output{-1.}; + Atomic audition_counter{0}; Atomic audition_instrument; Atomic audition_velocity; @@ -209,6 +223,18 @@ struct SettingsGetter SettingRef latency_regain; SettingRef latency_current; + SettingRef enable_powermap; + SettingRef powermap_fixed0_x; + SettingRef powermap_fixed0_y; + SettingRef powermap_fixed1_x; + SettingRef powermap_fixed1_y; + SettingRef powermap_fixed2_x; + SettingRef powermap_fixed2_y; + SettingRef powermap_shelf; + + SettingRef powermap_input; + SettingRef powermap_output; + SettingRef audition_counter; SettingRef audition_instrument; SettingRef audition_velocity; @@ -257,6 +283,16 @@ struct SettingsGetter , latency_stddev{settings.latency_stddev} , latency_regain{settings.latency_regain} , latency_current{settings.latency_current} + , enable_powermap{settings.enable_powermap} + , powermap_fixed0_x{settings.powermap_fixed0_x} + , powermap_fixed0_y{settings.powermap_fixed0_y} + , powermap_fixed1_x{settings.powermap_fixed1_x} + , powermap_fixed1_y{settings.powermap_fixed1_y} + , powermap_fixed2_x{settings.powermap_fixed2_x} + , powermap_fixed2_y{settings.powermap_fixed2_y} + , powermap_shelf{settings.powermap_shelf} + , powermap_input{settings.powermap_input} + , powermap_output{settings.powermap_output} , audition_counter{settings.audition_counter} , audition_instrument{settings.audition_instrument} , audition_velocity{settings.audition_velocity} @@ -321,6 +357,18 @@ public: Notifier latency_regain; Notifier latency_current; + Notifier enable_powermap; + Notifier powermap_fixed0_x; + Notifier powermap_fixed0_y; + Notifier powermap_fixed1_x; + Notifier powermap_fixed1_y; + Notifier powermap_fixed2_x; + Notifier powermap_fixed2_y; + Notifier powermap_shelf; + + Notifier powermap_input; + Notifier powermap_output; + Notifier audition_counter; Notifier audition_instrument; Notifier audition_velocity; @@ -383,6 +431,18 @@ public: EVAL(latency_regain); EVAL(latency_current); + EVAL(enable_powermap); + EVAL(powermap_fixed0_x); + EVAL(powermap_fixed0_y); + EVAL(powermap_fixed1_x); + EVAL(powermap_fixed1_y); + EVAL(powermap_fixed2_x); + EVAL(powermap_fixed2_y); + EVAL(powermap_shelf); + + EVAL(powermap_input); + EVAL(powermap_output); + EVAL(audition_counter); EVAL(audition_instrument); EVAL(audition_velocity); -- cgit v1.2.3