- Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(al->default_value(), al->get_min_y(), al->get_max_y()));
- if (!ac) {
- PBD::warning << "Creating AutomationController for " << al->param_id().to_string() << endmsg;
- ac = boost::shared_ptr<AutomationControl>(new AutomationControl(s, al));
- }
- return boost::shared_ptr<AutomationController>(new AutomationController(ac, adjustment));
+ 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);
+ return boost::shared_ptr<AutomationController>(new AutomationController(printer, ac, adjustment));