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 /gtk2_ardour | |
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 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/audio_time_axis.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 25 | ||||
-rw-r--r-- | gtk2_ardour/midi_time_axis.h | 5 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.h | 2 |
5 files changed, 26 insertions, 10 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 51aa299128..a991bffe54 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -319,7 +319,7 @@ AudioTimeAxisView::set_waveform_scale (WaveformScale scale) } void -AudioTimeAxisView::create_automation_child (Parameter param, bool show) +AudioTimeAxisView::create_automation_child (const Parameter& param, bool show) { if (param.type() == GainAutomation) { diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h index 1b090d881e..ce5697d7c1 100644 --- a/gtk2_ardour/audio_time_axis.h +++ b/gtk2_ardour/audio_time_axis.h @@ -82,7 +82,7 @@ class AudioTimeAxisView : public RouteTimeAxisView guint32 show_at (double y, int& nth, Gtk::VBox *parent); void hide (); - void create_automation_child (ARDOUR::Parameter param, bool show); + void create_automation_child (const ARDOUR::Parameter& param, bool show); void first_idle (); diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index b8f5da2ed9..7ef924dada 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -225,9 +225,15 @@ MidiTimeAxisView::build_automation_action_menu () MenuList& automation_items = automation_action_menu->items(); automation_items.push_back (SeparatorElem()); - automation_items.push_back (MenuElem (_("Controller..."), - mem_fun(*this, &MidiTimeAxisView::add_controller_track))); + mem_fun(*this, &MidiTimeAxisView::add_cc_track))); + automation_items.push_back (MenuElem (_("Bender"), + sigc::bind(mem_fun(*this, &MidiTimeAxisView::add_parameter_track), + Parameter(MidiPitchBenderAutomation)))); + automation_items.push_back (MenuElem (_("Pressure"), + sigc::bind(mem_fun(*this, &MidiTimeAxisView::add_parameter_track), + Parameter(MidiChannelPressureAutomation)))); + } Gtk::Menu* @@ -319,7 +325,7 @@ MidiTimeAxisView::show_existing_automation () /** Prompt for a controller with a dialog and add an automation track for it */ void -MidiTimeAxisView::add_controller_track() +MidiTimeAxisView::add_cc_track() { int response; Parameter param; @@ -337,13 +343,22 @@ MidiTimeAxisView::add_controller_track() create_automation_child(param, true); } + +/** Add an automation track for the given parameter (pitch bend, channel pressure). + */ +void +MidiTimeAxisView::add_parameter_track(const Parameter& param) +{ + create_automation_child(param, true); +} + void -MidiTimeAxisView::create_automation_child (Parameter param, bool show) +MidiTimeAxisView::create_automation_child (const Parameter& param, bool show) { if ( param.type() == MidiCCAutomation || param.type() == MidiPgmChangeAutomation || param.type() == MidiPitchBenderAutomation || - param.type() == MidiChannelAftertouchAutomation + param.type() == MidiChannelPressureAutomation ) { /* These controllers are region "automation", so we do not create diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h index e06e5cd534..f56ce604d4 100644 --- a/gtk2_ardour/midi_time_axis.h +++ b/gtk2_ardour/midi_time_axis.h @@ -68,8 +68,9 @@ class MidiTimeAxisView : public RouteTimeAxisView void show_all_automation (); void show_existing_automation (); - void add_controller_track (); - void create_automation_child (ARDOUR::Parameter param, bool show); + void add_cc_track (); + void add_parameter_track (const ARDOUR::Parameter& param); + void create_automation_child (const ARDOUR::Parameter& param, bool show); ARDOUR::NoteMode note_mode() const { return _note_mode; } diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 69dc47580a..b098894d8c 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -117,7 +117,7 @@ public: : param (par), menu_item (mi), track (tr) {} }; - virtual void create_automation_child (ARDOUR::Parameter param, bool show) = 0; + virtual void create_automation_child (const ARDOUR::Parameter& param, bool show) = 0; /* make sure we get the right version of this */ |