_controls[param] = ac;
- cerr << _name << ": added parameter " << param.to_string() << endl;
-
_can_automate_list.insert(param);
// Sync everything (derived classes) up to initial values
Automatable::find_next_event (nframes_t now, nframes_t end, ControlEvent& next_event) const
{
Controls::const_iterator li;
- AutomationList::TimeComparator cmp;
next_event.when = max_frames;
boost::shared_ptr<const AutomationList> alist (li->second->list());
ControlEvent cp (now, 0.0f);
- for (i = lower_bound (alist->const_begin(), alist->const_end(), &cp, cmp); i != alist->const_end() && (*i)->when < end; ++i) {
+ for (i = lower_bound (alist->const_begin(), alist->const_end(), &cp, AutomationList::time_comparator);
+ i != alist->const_end() && (*i)->when < end; ++i) {
if ((*i)->when > now) {
break;
}
// FIXME: this will die horribly if this is not a MidiTrack
return boost::shared_ptr<AutomationControl>(new MidiTrack::MidiControl((MidiTrack*)this, list));
} else {
- cerr << "WARNING: Default AutomationControl created for " << list->parameter().to_string() << endl;
return boost::shared_ptr<AutomationControl>(new AutomationControl(_session, list));
}
}