Display amp automation in dB using a logarithmic fader.

git-svn-id: svn://localhost/ardour2/branches/3.0@11535 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-02-27 17:17:19 +00:00
parent aef76e95d6
commit 3a4650cba7
3 changed files with 24 additions and 3 deletions

View file

@ -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);