diff options
author | Carl Hetherington <carl@carlh.net> | 2012-02-27 17:17:19 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-02-27 17:17:19 +0000 |
commit | 3a4650cba74ca858447da5e52988802ff786b81a (patch) | |
tree | f6cde8b99582c4ad012295298c34d8f47fbe5170 /gtk2_ardour/automation_controller.cc | |
parent | aef76e95d645e4b08f6e3ee54683249b7f995f65 (diff) |
Display amp automation in dB using a logarithmic fader.
git-svn-id: svn://localhost/ardour2/branches/3.0@11535 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 12 |
1 files changed, 9 insertions, 3 deletions
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<AutomationControl> 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); |