diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 91009bf487..d6c3d5b824 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -76,9 +76,15 @@ AutomationController::create( const Evoral::Parameter& param, boost::shared_ptr ac) { - Gtk::Adjustment* adjustment = manage (new Gtk::Adjustment (param.normal(), param.min(), param.max(), - (param.max() - param.min())/100.0, - (param.max() - param.min())/10.0)); + Gtk::Adjustment* adjustment = manage ( + new Gtk::Adjustment ( + ac->internal_to_interface (param.normal()), + ac->internal_to_interface (param.min()), + ac->internal_to_interface (param.max()), + (param.max() - param.min()) / 100.0, + (param.max() - param.min()) / 10.0 + ) + ); assert (ac); assert(ac->parameter() == param); diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index b038cde695..b74a57dbce 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -458,3 +458,16 @@ Amp::visible() const { return true; } + +std::string +Amp::value_as_string (boost::shared_ptr ac) const +{ + if (ac == _gain_control) { + char buffer[32]; + snprintf (buffer, sizeof (buffer), "%.2fdB", ac->internal_to_user (ac->get_value ())); + return buffer; + } + + return Automatable::value_as_string (ac); +} + diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index 398d43ee3e..fa2eb98ebf 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -98,6 +98,8 @@ public: return _gain_control; } + std::string value_as_string (boost::shared_ptr) const; + private: bool _denormal_protection; bool _apply_gain;