#include "ardour/automatable.h"
#include "ardour/event_type_map.h"
#include "ardour/gain_control.h"
+#include "ardour/monitor_control.h"
#include "ardour/midi_track.h"
#include "ardour/pan_controllable.h"
#include "ardour/pannable.h"
#include "ardour/plugin.h"
#include "ardour/plugin_insert.h"
+#include "ardour/record_enable_control.h"
#include "ardour/session.h"
#include "ardour/uri_map.h"
#include "ardour/value_as_string.h"
int
Automatable::old_set_automation_state (const XMLNode& node)
{
- const XMLProperty *prop;
+ XMLProperty const * prop;
if ((prop = node.property ("path")) != 0) {
load_automation (prop->value());
boost::shared_ptr<AutomationList> al = boost::dynamic_pointer_cast<AutomationList> (ac->list ());
- if (al) {
+ boost::shared_ptr<AutomationControl> actl (boost::dynamic_pointer_cast<AutomationControl> (ac));
+
+ if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
al->automation_state_changed.connect_same_thread (
_list_connections,
boost::bind (&Automatable::automation_list_automation_state_changed,
ControlSet::add_control (ac);
- if (al) {
+ if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
_can_automate_list.insert (param);
automation_list_automation_state_changed (param, al->automation_state ()); // sync everything up
}
if ((*niter)->name() == "AutomationList") {
- const XMLProperty* id_prop = (*niter)->property("automation-id");
+ XMLProperty const * id_prop = (*niter)->property("automation-id");
Evoral::Parameter param = (id_prop
? EventTypeMap::instance().from_symbol(id_prop->value())
bool make_list = true;
ParameterDescriptor desc(param);
boost::shared_ptr<AutomationList> list;
+
if (param.type() >= MidiCCAutomation && param.type() <= MidiChannelPressureAutomation) {
MidiTrack* mt = dynamic_cast<MidiTrack*>(this);
if (mt) {
} else {
warning << "PanAutomation for non-Pannable" << endl;
}
+ } else if (param.type() == RecEnableAutomation) {
+ Recordable* re = dynamic_cast<Recordable*> (this);
+ if (re) {
+ control = new RecordEnableControl (_a_session, X_("recenable"), *re);
+ }
+ } else if (param.type() == MonitoringAutomation) {
+ Monitorable* m = dynamic_cast<Monitorable*>(this);
+ if (m) {
+ control = new MonitorControl (_a_session, X_("monitor"), *m);
+ }
+ } else if (param.type() == SoloAutomation) {
+ Soloable* s = dynamic_cast<Soloable*>(this);
+ Muteable* m = dynamic_cast<Muteable*>(this);
+ if (s && m) {
+ control = new SoloControl (_a_session, X_("solo"), *s, *m);
+ }
+ } else if (param.type() == MuteAutomation) {
+ Muteable* m = dynamic_cast<Muteable*>(this);
+ if (m) {
+ control = new MuteControl (_a_session, X_("mute"), *m);
+ }
}
if (make_list && !list) {
}
string
-Automatable::value_as_string (boost::shared_ptr<AutomationControl> ac) const
+Automatable::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
{
return ARDOUR::value_as_string(ac->desc(), ac->get_value());
}