diff options
author | Sampo Savolainen <v2@iki.fi> | 2008-11-01 20:10:56 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2008-11-01 20:10:56 +0000 |
commit | 43d868cde8bea9932fc828dfd2461b0296bb9135 (patch) | |
tree | 0596dd4549c56eb78ba6d6fccb8fa5cf41f5ba13 /gtk2_ardour | |
parent | 3043b68bfbcd70ba13d132c8b833cdf3ba199266 (diff) |
Wiimote control surface. Bind one wiimote by pressing 1+2 after the surface module is loaded. You need to bind every time you start ardour:
A Toggle play/stop
D-pad:
Up/Down: scroll tracks in the editor
Left/Right: move playhead (nudge)
+/- Zoom
1 Arm selected track(s) for recording
2 Toggle recording
As an extra, if you press down B and then A to stopp recording pass, Ardour scraps the recorded audio.
This is a work in progress. Please test.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4079 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 22 |
4 files changed, 26 insertions, 2 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 1bd85650e1..fc231ff30e 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1047,8 +1047,6 @@ Editor::access_action (std::string action_group, std::string action_item) ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::access_action), action_group, action_item)); - cout<< "OSC: Recieved: "<< action_item << endl; - RefPtr<Action> act; act = ActionManager::get_action( action_group.c_str(), action_item.c_str() ); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 3d3acffb29..7e0126bb04 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1052,6 +1052,7 @@ class Editor : public PublicEditor void toggle_region_mute (); void toggle_region_lock (); void toggle_region_opaque (); + void toggle_record_enable (); void set_region_lock_style (ARDOUR::Region::PositionLockStyle); void raise_region (); void raise_region_to_top (); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 1aea9364b9..5ecb529bdf 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -205,6 +205,9 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "select-prev-route", _("Select Previous Track/Bus"), mem_fun(*this, &Editor::select_prev_route)); ActionManager::session_sensitive_actions.push_back (act); + act = ActionManager::register_action (editor_actions, "track-record-enable-toggle", _("Toggle Record Enable"), mem_fun(*this, &Editor::toggle_record_enable)); + ActionManager::session_sensitive_actions.push_back (act); + act = ActionManager::register_action (editor_actions, "save-visual-state-1", _("Save View 1"), bind (mem_fun (*this, &Editor::start_visual_state_op), 0)); ActionManager::session_sensitive_actions.push_back (act); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index cc2622cd1c..43dd06780c 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4642,6 +4642,28 @@ Editor::toggle_region_opaque () } void +Editor::toggle_record_enable () +{ + bool new_state; + bool first = true; + for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { + RouteTimeAxisView *rtav = dynamic_cast<RouteTimeAxisView *>(*i); + if (!rtav) + continue; + if (!rtav->is_track()) + continue; + + if (first) { + new_state = !rtav->track()->record_enabled(); + first = false; + } + + rtav->track()->set_record_enable(new_state, this); + } +} + + +void Editor::set_fade_length (bool in) { RegionSelection rs; |