summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-01-21 16:38:56 +0000
committerCarl Hetherington <carl@carlh.net>2012-01-21 16:38:56 +0000
commit4381b590bbc6e5e6c3f8d5b4e8d88d8a085280b1 (patch)
treea4d7e211489431f9c592828571b036995fef69d6 /libs/ardour
parenta8bb49e5d89f2689d6aeb61381e3c4bd3560d859 (diff)
Reinstate user Controllable values, as they are needed
for gain (which I forgot about). git-svn-id: svn://localhost/ardour2/branches/3.0@11293 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/amp.cc12
-rw-r--r--libs/ardour/ardour/amp.h6
-rw-r--r--libs/ardour/ardour/automation_control.h12
-rw-r--r--libs/ardour/ardour/plugin_insert.h4
-rw-r--r--libs/ardour/plugin_insert.cc4
5 files changed, 25 insertions, 13 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc
index 01a31329cf..b038cde695 100644
--- a/libs/ardour/amp.cc
+++ b/libs/ardour/amp.cc
@@ -423,21 +423,21 @@ Amp::GainControl::set_value (double val)
}
double
-Amp::GainControl::get_value (void) const
+Amp::GainControl::internal_to_interface (double v) const
{
- return AutomationControl::get_value();
+ return gain_to_slider_position (v);
}
double
-Amp::GainControl::user_to_ui (double v) const
+Amp::GainControl::interface_to_internal (double v) const
{
- return gain_to_slider_position (v);
+ return slider_position_to_gain (v);
}
double
-Amp::GainControl::ui_to_user (double v) const
+Amp::GainControl::internal_to_user (double v) const
{
- return slider_position_to_gain (v);
+ return accurate_coefficient_to_dB (v);
}
void
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h
index b811cca173..398d43ee3e 100644
--- a/libs/ardour/ardour/amp.h
+++ b/libs/ardour/ardour/amp.h
@@ -82,10 +82,10 @@ public:
}
void set_value (double val);
- double get_value (void) const;
- double user_to_ui (double) const;
- double ui_to_user (double) const;
+ double internal_to_interface (double) const;
+ double interface_to_internal (double) const;
+ double internal_to_user (double) const;
Amp* _amp;
};
diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h
index 7e375de3ed..2aa8490086 100644
--- a/libs/ardour/ardour/automation_control.h
+++ b/libs/ardour/ardour/automation_control.h
@@ -77,6 +77,18 @@ public:
void set_value (double);
double get_value () const;
+ virtual double internal_to_interface (double v) const {
+ return v;
+ }
+
+ virtual double interface_to_internal (double v) const {
+ return v;
+ }
+
+ virtual double internal_to_user (double v) const {
+ return v;
+ }
+
double lower() const { return parameter().min(); }
double upper() const { return parameter().max(); }
double normal() const { return parameter().normal(); }
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index f6afd13573..5b4a5294f2 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -89,8 +89,8 @@ class PluginInsert : public Processor
double get_value (void) const;
XMLNode& get_state();
- double user_to_ui (double) const;
- double ui_to_user (double) const;
+ double internal_to_interface (double) const;
+ double interface_to_internal (double) const;
private:
PluginInsert* _plugin;
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 74f82aaade..a03c25ee72 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -1174,7 +1174,7 @@ PluginInsert::PluginControl::set_value (double user_val)
}
double
-PluginInsert::PluginControl::user_to_ui (double val) const
+PluginInsert::PluginControl::internal_to_interface (double val) const
{
if (_logarithmic) {
if (val > 0) {
@@ -1188,7 +1188,7 @@ PluginInsert::PluginControl::user_to_ui (double val) const
}
double
-PluginInsert::PluginControl::ui_to_user (double val) const
+PluginInsert::PluginControl::interface_to_internal (double val) const
{
if (_logarithmic) {
val = exp (val);