diff options
author | David Robillard <d@drobilla.net> | 2008-09-21 18:08:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-21 18:08:18 +0000 |
commit | a43d53e3b92b02f4c35b4935509bf523f7630d94 (patch) | |
tree | f6289ef64f48cdedb37b24830698950c00ab668c /libs | |
parent | ca12fe973324cbc000bf2aa46d9c378022a14fa2 (diff) |
- Call channel pressure channel pressure, not aftertouch (that's key specific).
- Add context menu items to add a bender or pressure automation track to a MIDI track.
- Now just need to figure out creation of program change events and you can create
everything MIDI ardour understands from the GUI...
git-svn-id: svn://localhost/ardour2/branches/3.0@3782 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/parameter.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 2 | ||||
-rw-r--r-- | libs/ardour/audioengine.cc | 2 | ||||
-rw-r--r-- | libs/ardour/automatable.cc | 6 | ||||
-rw-r--r-- | libs/ardour/midi_track.cc | 2 | ||||
-rw-r--r-- | libs/ardour/parameter.cc | 10 |
6 files changed, 13 insertions, 13 deletions
diff --git a/libs/ardour/ardour/parameter.h b/libs/ardour/ardour/parameter.h index 9ffeb98995..5c390c1039 100644 --- a/libs/ardour/ardour/parameter.h +++ b/libs/ardour/ardour/parameter.h @@ -93,7 +93,7 @@ public: break; case MidiCCAutomation: case MidiPgmChangeAutomation: - case MidiChannelAftertouchAutomation: + case MidiChannelPressureAutomation: Evoral::MIDI::controller_range(min, max, normal); break; case MidiPitchBenderAutomation: Evoral::MIDI::bender_range(min, max, normal); break; @@ -108,7 +108,7 @@ public: std::string symbol() const; inline bool is_integer() const { - return (_type >= MidiCCAutomation && _type <= MidiChannelAftertouchAutomation); + return (_type >= MidiCCAutomation && _type <= MidiChannelPressureAutomation); } inline operator Parameter() { return (Parameter)*this; } diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 06c055bbe6..ce76a247cb 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -89,7 +89,7 @@ namespace ARDOUR { MidiCCAutomation = 0x20, MidiPgmChangeAutomation = 0x21, MidiPitchBenderAutomation = 0x22, - MidiChannelAftertouchAutomation = 0x23, + MidiChannelPressureAutomation = 0x23, FadeInAutomation = 0x40, FadeOutAutomation = 0x80, EnvelopeAutomation = 0x100 diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 71481e695f..956b956020 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -95,7 +95,7 @@ AudioEngine::AudioEngine (string client_name) Parameter::init_metadata(MidiCCAutomation); Parameter::init_metadata(MidiPgmChangeAutomation); Parameter::init_metadata(MidiPitchBenderAutomation); - Parameter::init_metadata(MidiChannelAftertouchAutomation); + Parameter::init_metadata(MidiChannelPressureAutomation); Parameter::init_metadata(FadeInAutomation); Parameter::init_metadata(FadeOutAutomation); Parameter::init_metadata(EnvelopeAutomation); diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index f77975c303..a54bad5f6f 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -161,8 +161,8 @@ Automatable::describe_parameter (Parameter param) 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 if (param.type() == MidiChannelPressureAutomation) { + return string_compose("Pressure [%1]", int(param.channel()) + 1); } else { return param.symbol(); } @@ -392,7 +392,7 @@ Automatable::control_factory(const Evoral::Parameter& param) { boost::shared_ptr<AutomationList> list(new AutomationList(param)); Evoral::Control* control = NULL; - if (param.type() >= MidiCCAutomation && param.type() <= MidiChannelAftertouchAutomation) { + if (param.type() >= MidiCCAutomation && param.type() <= MidiChannelPressureAutomation) { control = new MidiTrack::MidiControl((MidiTrack*)this, param); } else { control = new AutomationControl(_a_session, param); diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index ffe8b20303..745e5bf1b7 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -764,7 +764,7 @@ MidiTrack::MidiControl::set_value(float val) ev[1] = int(val); break; - case MidiChannelAftertouchAutomation: + case MidiChannelPressureAutomation: size = 2; ev[0] += MIDI_CMD_CHANNEL_PRESSURE; ev[1] = int(val); diff --git a/libs/ardour/parameter.cc b/libs/ardour/parameter.cc index 87b5d329a2..d6e9d16db5 100644 --- a/libs/ardour/parameter.cc +++ b/libs/ardour/parameter.cc @@ -68,10 +68,10 @@ Parameter::Parameter(const std::string& str) assert(channel < 16); _id = 0; _channel = channel; - } else if (str.length() > 24 && str.substr(0, 24) == "midi-channel-aftertouch-") { - _type = MidiChannelAftertouchAutomation; + } else if (str.length() > 24 && str.substr(0, 24) == "midi-channel-pressure-") { + _type = MidiChannelPressureAutomation; uint32_t channel = 0; - sscanf(str.c_str(), "midi-channel-aftertouch-%d", &channel); + sscanf(str.c_str(), "midi-channel-pressure-%d", &channel); assert(channel < 16); _id = 0; _channel = channel; @@ -111,8 +111,8 @@ Parameter::symbol() const return string_compose("midi-pgm-change-%1", int(_channel)); } else if (_type == MidiPitchBenderAutomation) { return string_compose("midi-pitch-bender-%1", int(_channel)); - } else if (_type == MidiChannelAftertouchAutomation) { - return string_compose("midi-channel-aftertouch-%1", int(_channel)); + } else if (_type == MidiChannelPressureAutomation) { + return string_compose("midi-channel-pressure-%1", int(_channel)); } else { PBD::warning << "Uninitialized Parameter symbol() called." << endmsg; return ""; |