diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-05-03 06:37:22 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-05-03 06:37:22 +0000 |
commit | b0d49651a77e6355e180c0a1d85ac3cb1288bc97 (patch) | |
tree | e3731789342c629376f6801e825f938e4c195706 /libs/ardour/automatable.cc | |
parent | fb1fbf71af452ecff0a257bda228d1b31912c8ee (diff) |
* MidiModel::const_iterator::operator++: added AUTOMATION type
* automatable.cc/parameter.cc: Added friendly names for the new Midi parameter types
* fixed a failed assertion problem (note on channel != note off channel), but have no idea how :)
* changed lots of whitespace :|
git-svn-id: svn://localhost/ardour2/branches/3.0@3309 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/automatable.cc')
-rw-r--r-- | libs/ardour/automatable.cc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 8b8b843384..feeef25e7e 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -198,14 +198,21 @@ Automatable::describe_parameter (Parameter param) { /* derived classes like PluginInsert should override this */ - if (param == Parameter(GainAutomation)) + if (param == Parameter(GainAutomation)) { return _("Fader"); - else if (param.type() == PanAutomation) + } else if (param.type() == PanAutomation) { return (string_compose(_("Pan %1"), param.id())); - else if (param.type() == MidiCCAutomation) - return string_compose("CC %1", param.id()); - else + } else if (param.type() == MidiCCAutomation) { + return string_compose("CC %1 [%2]", param.id(), int(param.channel()) + 1); + } else if (param.type() == MidiPgmChangeAutomation) { + return string_compose("Program [%1]", int(param.channel()) + 1); + } else if (param.type() == MidiPitchBenderAutomation) { + return string_compose("Bender [%1]", int(param.channel()) + 1); + } else if (param.type() == MidiChannelAftertouchAutomation) { + return string_compose("Aftertouch [%1]", int(param.channel()) + 1); + } else { return param.to_string(); + } } void @@ -455,7 +462,11 @@ Automatable::transport_stopped (nframes_t now) boost::shared_ptr<AutomationControl> Automatable::control_factory(boost::shared_ptr<AutomationList> list) { - if (list->parameter().type() == MidiCCAutomation) { + if ( + list->parameter().type() == MidiCCAutomation || + list->parameter().type() == MidiPgmChangeAutomation || + list->parameter().type() == MidiChannelAftertouchAutomation + ) { // FIXME: this will die horribly if this is not a MidiTrack return boost::shared_ptr<AutomationControl>(new MidiTrack::MidiControl((MidiTrack*)this, list)); } else { |