diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-05-10 01:25:38 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-05-10 01:25:38 +0000 |
commit | 7fd65ed78de5f0e3e9dcb99a3aeb55bedd640daf (patch) | |
tree | 0f865bdce67fb9e0290b7310b5be8f6bb520e9af /libs | |
parent | 4e745fc17c22ade138bc7decc93df2e3d8cd354f (diff) |
* fixed bug: MIDI automations could not be restored from XML (NullAutomationType)
git-svn-id: svn://localhost/ardour2/branches/3.0@3331 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/parameter.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/parameter.cc b/libs/ardour/parameter.cc index 528d7e114c..1b94e5dc4d 100644 --- a/libs/ardour/parameter.cc +++ b/libs/ardour/parameter.cc @@ -56,6 +56,27 @@ Parameter::Parameter(const std::string& str) sscanf(str.c_str(), "midicc-%d-%d", &channel, &_id); assert(channel < 16); _channel = channel; + } else if (str.length() > 16 && str.substr(0, 16) == "midi-pgm-change-") { + _type = MidiPgmChangeAutomation; + uint32_t channel = 0; + sscanf(str.c_str(), "midi-pgm-change-%d", &channel); + assert(channel < 16); + _id = 0; + _channel = channel; + } else if (str.length() > 18 && str.substr(0, 18) == "midi-pitch-bender-") { + _type = MidiPitchBenderAutomation; + uint32_t channel = 0; + sscanf(str.c_str(), "midi-pitch-bender-%d", &channel); + assert(channel < 16); + _id = 0; + _channel = channel; + } else if (str.length() > 24 && str.substr(0, 24) == "midi-channel-aftertouch-") { + _type = MidiChannelAftertouchAutomation; + uint32_t channel = 0; + sscanf(str.c_str(), "midi-channel-aftertouch-%d", &channel); + assert(channel < 16); + _id = 0; + _channel = channel; } else { PBD::warning << "Unknown Parameter '" << str << "'" << endmsg; } |