summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/powermapfilter.cc2
-rw-r--r--src/settings.h15
2 files changed, 17 insertions, 0 deletions
diff --git a/src/powermapfilter.cc b/src/powermapfilter.cc
index 702a837..45df51e 100644
--- a/src/powermapfilter.cc
+++ b/src/powermapfilter.cc
@@ -38,6 +38,7 @@ bool PowermapFilter::filter(event_t& event, size_t pos)
// the position is irrelevant for this filter
(void) pos;
+ settings.powermap_input.store(event.velocity);
if (settings.enable_powermap.load())
{
powermap.setFixed0({settings.powermap_fixed0_x.load(), settings.powermap_fixed0_y.load()});
@@ -47,6 +48,7 @@ bool PowermapFilter::filter(event_t& event, size_t pos)
event.velocity = powermap.map(event.velocity);
}
+ settings.powermap_output.store(event.velocity);
return true;
}
diff --git a/src/settings.h b/src/settings.h
index 471d730..a3d21d0 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -154,6 +154,10 @@ struct Settings
Atomic<float> powermap_fixed2_y{1.};
Atomic<bool> powermap_shelf{true};
+ // Powermap visualizer; -1 is "none"
+ Atomic<float> powermap_input{-1.};
+ Atomic<float> powermap_output{-1.};
+
Atomic<std::size_t> audition_counter{0};
Atomic<std::string> audition_instrument;
Atomic<float> audition_velocity;
@@ -228,6 +232,9 @@ struct SettingsGetter
SettingRef<float> powermap_fixed2_y;
SettingRef<bool> powermap_shelf;
+ SettingRef<float> powermap_input;
+ SettingRef<float> powermap_output;
+
SettingRef<std::size_t> audition_counter;
SettingRef<std::string> audition_instrument;
SettingRef<float> audition_velocity;
@@ -284,6 +291,8 @@ struct SettingsGetter
, 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}
@@ -357,6 +366,9 @@ public:
Notifier<float> powermap_fixed2_y;
Notifier<bool> powermap_shelf;
+ Notifier<float> powermap_input;
+ Notifier<float> powermap_output;
+
Notifier<std::size_t> audition_counter;
Notifier<std::string> audition_instrument;
Notifier<int> audition_velocity;
@@ -428,6 +440,9 @@ public:
EVAL(powermap_fixed2_y);
EVAL(powermap_shelf);
+ EVAL(powermap_input);
+ EVAL(powermap_output);
+
EVAL(audition_counter);
EVAL(audition_instrument);
EVAL(audition_velocity);