summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/monitor_processor.h
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2014-07-18 08:47:45 -0500
committerBen Loftis <ben@harrisonconsoles.com>2014-07-18 08:47:45 -0500
commitb2b736d596123de52dac700db769ac4eb576da5c (patch)
treec800fa5fd3a84d3c7b0749ba3edb5b9fd89629ed /libs/ardour/ardour/monitor_processor.h
parentac9219a3c884b69352ff5ab0d13f30fb15cf8e6e (diff)
tweaks for the monitor section. refactoring of some buttons, using new ArdourKnob instead of VolumeController. New ArdourDisplay shows a controllables user value, and provides support for preset values (hardcoded at present). Further refactoring to come, so that ArdourWidgets are derived from a common class. Controllable now has more responsibility for scaling between internal, user, and interface (knob percent) values. This also needs more refactoring and might have some unintended consequences. tested with audio and nothing seems amiss, yet.
Diffstat (limited to 'libs/ardour/ardour/monitor_processor.h')
-rw-r--r--libs/ardour/ardour/monitor_processor.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h
index 33b3e9c366..2fe108a427 100644
--- a/libs/ardour/ardour/monitor_processor.h
+++ b/libs/ardour/ardour/monitor_processor.h
@@ -32,6 +32,8 @@
#include "ardour/types.h"
#include "ardour/processor.h"
+#include "ardour/dB.h"
+
class XMLNode;
namespace ARDOUR {
@@ -63,6 +65,15 @@ public:
return (float) _value;
}
+ double internal_to_user (double i) const { return accurate_coefficient_to_dB (i);}
+ double user_to_internal (double u) const { return dB_to_coefficient(u) ;}
+
+ std::string get_user_string () const
+ {
+ char theBuf[32]; sprintf( theBuf, "%3.1f dB", accurate_coefficient_to_dB (get_value()));
+ return std::string(theBuf);
+ }
+
double lower () const { return _lower; }
double upper () const { return _upper; }