From 2afc311f098217d3a86bd434996d45d3324b477c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 23 Feb 2018 14:56:58 -0500 Subject: catch (incorrect) inclusion of non-MIDI related automation parameters in MidiSource XML nodes --- libs/ardour/midi_source.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc index d7bc4d333e..18efd4e9ea 100644 --- a/libs/ardour/midi_source.cc +++ b/libs/ardour/midi_source.cc @@ -123,6 +123,20 @@ MidiSource::set_state (const XMLNode& node, int /*version*/) } Evoral::Parameter p = EventTypeMap::instance().from_symbol (str); + switch (p.type()) { + case MidiCCAutomation: + case MidiPgmChangeAutomation: break; + case MidiChannelPressureAutomation: break; + case MidiNotePressureAutomation: break; + case MidiPitchBenderAutomation: break; + case MidiSystemExclusiveAutomation: + cerr << "Parameter \"" << str << "\" is system exclusive - no automation possible!\n"; + continue; + default: + cerr << "Parameter \"" << str << "\" found for MIDI source ... not legal; ignoring this parameter\n"; + continue; + } + if (!(*i)->get_property (X_("style"), str)) { error << _("Missing style property on InterpolationStyle") << endmsg; return -1; -- cgit v1.2.3