NO-OP; whitespace
[ardour.git] / libs / ardour / automatable.cc
index e108676fa7b5f6096b0a7667952b20d0031f5c50..7ad930f60b510284823cd85c78cd6f53b1d73bf0 100644 (file)
 #include "ardour/plugin_insert.h"
 #include "ardour/record_enable_control.h"
 #include "ardour/session.h"
+#ifdef LV2_SUPPORT
 #include "ardour/uri_map.h"
+#endif
 #include "ardour/value_as_string.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -186,6 +188,8 @@ Automatable::describe_parameter (Evoral::Parameter param)
                return string_compose("Bender [%1]", int(param.channel()) + 1);
        } else if (param.type() == MidiChannelPressureAutomation) {
                return string_compose("Pressure [%1]", int(param.channel()) + 1);
+       } else if (param.type() == MidiNotePressureAutomation) {
+               return string_compose("PolyPressure [%1]", int(param.channel()) + 1);
 #ifdef LV2_SUPPORT
        } else if (param.type() == PluginPropertyAutomation) {
                return string_compose("Property %1", URIMap::instance().id_to_uri(param.id()));
@@ -233,7 +237,12 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le
                        if (param.type() == NullAutomation) {
                                warning << "Automation has null type" << endl;
                                continue;
-                        }
+                       }
+
+                       if (_can_automate_list.find (param) == _can_automate_list.end ()) {
+                               warning << "Ignored automation data for non-automatable parameter" << endl;
+                               continue;
+                       }
 
                        if (!id_prop) {
                                warning << "AutomationList node without automation-id property, "
@@ -271,7 +280,7 @@ Automatable::get_automation_xml_state ()
 
        for (Controls::iterator li = controls().begin(); li != controls().end(); ++li) {
                boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(li->second->list());
-               if (l && !l->empty()) {
+               if (l) {
                        node->add_child_nocopy (l->get_state ());
                }
        }