summaryrefslogtreecommitdiff
path: root/libs/ardour/event_type_map.cc
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2009-01-28 04:55:31 +0000
committerHans Baier <hansfbaier@googlemail.com>2009-01-28 04:55:31 +0000
commit3705a2d6307cf443acbf8419b0e0f560591f2016 (patch)
tree0702629940e808aa553d1d344ac49dac2d7ca9c2 /libs/ardour/event_type_map.cc
parent6c538ab719c49262da159e9568bb1f8fb30e1518 (diff)
* MIDI control lanes: Set Interpolationtype according to Parameter
git-svn-id: svn://localhost/ardour2/branches/3.0@4452 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/event_type_map.cc')
-rw-r--r--libs/ardour/event_type_map.cc57
1 files changed, 57 insertions, 0 deletions
diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc
index a4d8317a42..3b4fefdcea 100644
--- a/libs/ardour/event_type_map.cc
+++ b/libs/ardour/event_type_map.cc
@@ -75,6 +75,63 @@ EventTypeMap::is_integer(const Evoral::Parameter& param) const
&& param.type() <= MidiChannelPressureAutomation);
}
+Evoral::ControlList::InterpolationStyle
+EventTypeMap::interpolation_of(const Evoral::Parameter& param)
+{
+ switch (param.type()) {
+ case MidiCCAutomation:
+ switch (param.id()) {
+ case MIDI_CTL_LSB_BANK:
+ case MIDI_CTL_MSB_BANK:
+ case MIDI_CTL_LSB_EFFECT1:
+ case MIDI_CTL_LSB_EFFECT2:
+ case MIDI_CTL_MSB_EFFECT1:
+ case MIDI_CTL_MSB_EFFECT2:
+ case MIDI_CTL_MSB_GENERAL_PURPOSE1:
+ case MIDI_CTL_MSB_GENERAL_PURPOSE2:
+ case MIDI_CTL_MSB_GENERAL_PURPOSE3:
+ case MIDI_CTL_MSB_GENERAL_PURPOSE4:
+ case MIDI_CTL_SUSTAIN:
+ case MIDI_CTL_PORTAMENTO:
+ case MIDI_CTL_SOSTENUTO:
+ case MIDI_CTL_SOFT_PEDAL:
+ case MIDI_CTL_LEGATO_FOOTSWITCH:
+ case MIDI_CTL_HOLD2:
+ case MIDI_CTL_GENERAL_PURPOSE5:
+ case MIDI_CTL_GENERAL_PURPOSE6:
+ case MIDI_CTL_GENERAL_PURPOSE7:
+ case MIDI_CTL_GENERAL_PURPOSE8:
+ case MIDI_CTL_DATA_INCREMENT:
+ case MIDI_CTL_DATA_DECREMENT:
+ case MIDI_CTL_NONREG_PARM_NUM_LSB:
+ case MIDI_CTL_NONREG_PARM_NUM_MSB:
+ case MIDI_CTL_REGIST_PARM_NUM_LSB:
+ case MIDI_CTL_REGIST_PARM_NUM_MSB:
+ case MIDI_CTL_ALL_SOUNDS_OFF:
+ case MIDI_CTL_RESET_CONTROLLERS:
+ case MIDI_CTL_LOCAL_CONTROL_SWITCH:
+ case MIDI_CTL_ALL_NOTES_OFF:
+ case MIDI_CTL_OMNI_OFF:
+ case MIDI_CTL_OMNI_ON:
+ case MIDI_CTL_MONO:
+ case MIDI_CTL_POLY:
+
+ return Evoral::ControlList::Discrete;
+ break;
+
+ default: return Evoral::ControlList::Linear; break;
+ }
+
+ break;
+
+ case MidiPgmChangeAutomation: return Evoral::ControlList::Discrete; break;
+ case MidiChannelPressureAutomation: return Evoral::ControlList::Linear; break;
+ case MidiPitchBenderAutomation: return Evoral::ControlList::Linear; break;
+ default: assert(false);
+ }
+}
+
+
Evoral::Parameter
EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const
{