diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-08-18 12:35:15 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-08-19 08:32:44 -0400 |
commit | 26f1578568f8b81c9c6e9abf5d0a1f4c478f6118 (patch) | |
tree | 84997da6958926468362fdcfa730d1d84e46dc4f /libs/ardour/event_type_map.cc | |
parent | d6691a80e97ba6edf0d324f24a64cae581575a95 (diff) |
MIDI polyphonic pressure, part 2
Diffstat (limited to 'libs/ardour/event_type_map.cc')
-rw-r--r-- | libs/ardour/event_type_map.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc index 28f688df81..0b62d4a54b 100644 --- a/libs/ardour/event_type_map.cc +++ b/libs/ardour/event_type_map.cc @@ -115,6 +115,7 @@ EventTypeMap::interpolation_of(const Evoral::Parameter& param) break; case MidiPgmChangeAutomation: return Evoral::ControlList::Discrete; break; case MidiChannelPressureAutomation: return Evoral::ControlList::Linear; break; + case MidiNotePressureAutomation: return Evoral::ControlList::Linear; break; case MidiPitchBenderAutomation: return Evoral::ControlList::Linear; break; default: assert(false); } @@ -192,6 +193,13 @@ EventTypeMap::from_symbol(const string& str) const assert(channel < 16); p_id = 0; p_channel = channel; + } else if (str.length() > 19 && str.substr(0, 19) == "midi-note-pressure-") { + p_type = MidiNotePressureAutomation; + uint32_t channel = 0; + sscanf(str.c_str(), "midi-note-pressure-%d-%d", &channel, &p_id); + assert(channel < 16); + assert(p_id < 127); + p_channel = channel; } else { PBD::warning << "Unknown Parameter '" << str << "'" << endmsg; } @@ -250,6 +258,8 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const return string_compose("midi-pitch-bender-%1", int(param.channel())); } else if (t == MidiChannelPressureAutomation) { return string_compose("midi-channel-pressure-%1", int(param.channel())); + } else if (t == MidiChannelPressureAutomation) { + return string_compose("midi-note-pressure-%1-%2", int(param.channel()), param.id()); } else { PBD::warning << "Uninitialized Parameter symbol() called." << endmsg; return ""; |