#include "ardour/types.h"
#include "ardour/processor.h"
+#include "ardour/dB.h"
+
class XMLNode;
namespace ARDOUR {
class Session;
template<typename T>
-class LIBARDOUR_API MPControl : public PBD::Controllable {
+class /*LIBARDOUR_API*/ MPControl : public PBD::Controllable {
public:
MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag,
float lower = 0.0f, float upper = 1.0f)
, _value (initial)
, _lower (lower)
, _upper (upper)
+ , _normal (initial)
{}
/* Controllable API */
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; }
+ double normal () const { return _normal; }
/* "access as T" API */
T _value;
T _lower;
T _upper;
+ T _normal;
};
class LIBARDOUR_API MonitorProcessor : public Processor