mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
add more remote transport toggles for touchOSC: midi_panic, toggle_roll, stop_forget, set_X_range, quick snapshots. also add boilerplate for monitor controls, but those are not implemented yet
This commit is contained in:
parent
36e1ff48bc
commit
16623b1cb3
7 changed files with 145 additions and 3 deletions
|
|
@ -2453,6 +2453,21 @@ ARDOUR_UI::save_session_as ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::quick_snapshot_session (bool switch_to_it)
|
||||
{
|
||||
char timebuf[128];
|
||||
time_t n;
|
||||
struct tm local_time;
|
||||
|
||||
time (&n);
|
||||
localtime_r (&n, &local_time);
|
||||
strftime (timebuf, sizeof(timebuf), "%FT%H.%M.%S", &local_time);
|
||||
|
||||
save_state (timebuf, switch_to_it);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ARDOUR_UI::process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -609,6 +609,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
bool process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it);
|
||||
void snapshot_session (bool switch_to_it);
|
||||
|
||||
void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file
|
||||
|
||||
SaveAsDialog* save_as_dialog;
|
||||
|
||||
bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
|
||||
|
|
|
|||
|
|
@ -161,6 +161,14 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("QuickSnapshotStay"), _("Quick Snapshot(& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::quick_snapshot_session), false));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("QuickSnapshotSwitch"), _("Quick Snapshot (& switch to new version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::quick_snapshot_session), true));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("SaveAs"), _("Save As..."), sigc::mem_fun(*this, &ARDOUR_UI::save_session_as));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
|
|
|||
|
|
@ -363,6 +363,73 @@ BasicUI::toggle_click ()
|
|||
access_action("Transport/ToggleClick");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::midi_panic ()
|
||||
{
|
||||
access_action("MIDI/panic");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::toggle_roll ()
|
||||
{
|
||||
access_action("Transport/ToggleRoll");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::stop_forget ()
|
||||
{
|
||||
access_action("Transport/ToggleRollForgetCapture");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::set_punch_range ()
|
||||
{
|
||||
access_action("Editor/set-punch-from-edit-range");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::set_loop_range ()
|
||||
{
|
||||
access_action("Editor/set-loop-from-edit-range");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::set_session_range ()
|
||||
{
|
||||
access_action("Editor/set-session-from-edit-range");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::toggle_monitor_mute ()
|
||||
{
|
||||
//access_action("Editor/toggle_monitor_mute"); ToDo
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::toggle_monitor_dim ()
|
||||
{
|
||||
//access_action("Editor/toggle_monitor_dim"); ToDo
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::toggle_monitor_mono ()
|
||||
{
|
||||
//access_action("Editor/toggle_monitor_mono"); ToDo
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::quick_snapshot_stay ()
|
||||
{
|
||||
access_action("Main/QuickSnapshotStay");
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::quick_snapshot_switch ()
|
||||
{
|
||||
access_action("Main/QuickSnapshotSwitch");
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BasicUI::locating ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,6 +86,22 @@ class LIBCONTROLCP_API BasicUI {
|
|||
void mark_out();
|
||||
|
||||
void toggle_click();
|
||||
void midi_panic();
|
||||
|
||||
void toggle_monitor_mute();
|
||||
void toggle_monitor_dim();
|
||||
void toggle_monitor_mono();
|
||||
|
||||
void quick_snapshot_stay ();
|
||||
void quick_snapshot_switch ();
|
||||
|
||||
void toggle_roll(); //this provides the same operation as the "spacebar", it's a lot smarter than "play".
|
||||
|
||||
void stop_forget();
|
||||
|
||||
void set_punch_range();
|
||||
void set_loop_range();
|
||||
void set_session_range();
|
||||
|
||||
void set_record_enable (bool yn);
|
||||
bool get_record_enabled ();
|
||||
|
|
|
|||
|
|
@ -336,7 +336,6 @@ OSC::register_callbacks()
|
|||
|
||||
REGISTER_CALLBACK (serv, "/routes/list", "", routes_list);
|
||||
REGISTER_CALLBACK (serv, "/ardour/add_marker", "", add_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/remove_marker", "", remove_marker_at_playhead);
|
||||
REGISTER_CALLBACK (serv, "/ardour/access_action", "s", access_action);
|
||||
REGISTER_CALLBACK (serv, "/ardour/loop_toggle", "", loop_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/loop_location", "ii", loop_location);
|
||||
|
|
@ -360,11 +359,23 @@ OSC::register_callbacks()
|
|||
REGISTER_CALLBACK (serv, "/ardour/toggle_punch_out", "", toggle_punch_out);
|
||||
REGISTER_CALLBACK (serv, "/ardour/rec_enable_toggle", "", rec_enable_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/toggle_all_rec_enables", "", toggle_all_rec_enables);
|
||||
REGISTER_CALLBACK (serv, "/ardour/remove_marker", "", remove_marker_at_playhead);
|
||||
REGISTER_CALLBACK (serv, "/ardour/jump_bars", "f", jump_by_bars);
|
||||
REGISTER_CALLBACK (serv, "/ardour/jump_seconds", "f", jump_by_seconds);
|
||||
REGISTER_CALLBACK (serv, "/ardour/mark_in", "", mark_in);
|
||||
REGISTER_CALLBACK (serv, "/ardour/mark_out", "", mark_out);
|
||||
REGISTER_CALLBACK (serv, "/ardour/toggle_click", "", toggle_click);
|
||||
REGISTER_CALLBACK (serv, "/ardour/midi_panic", "", midi_panic);
|
||||
REGISTER_CALLBACK (serv, "/ardour/toggle_roll", "", toggle_roll);
|
||||
REGISTER_CALLBACK (serv, "/ardour/stop_forget", "", stop_forget);
|
||||
REGISTER_CALLBACK (serv, "/ardour/set_punch_range", "", set_punch_range);
|
||||
REGISTER_CALLBACK (serv, "/ardour/set_loop_range", "", set_loop_range);
|
||||
REGISTER_CALLBACK (serv, "/ardour/set_session_range", "", set_session_range);
|
||||
REGISTER_CALLBACK (serv, "/ardour/toggle_monitor_mute", "", toggle_monitor_mute);
|
||||
REGISTER_CALLBACK (serv, "/ardour/toggle_monitor_dim", "", toggle_monitor_dim);
|
||||
REGISTER_CALLBACK (serv, "/ardour/toggle_monitor_mono", "", toggle_monitor_mono);
|
||||
REGISTER_CALLBACK (serv, "/ardour/quick_snapshot_switch", "", quick_snapshot_switch);
|
||||
REGISTER_CALLBACK (serv, "/ardour/quick_snapshot_stay", "", quick_snapshot_stay);
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -379,7 +390,6 @@ OSC::register_callbacks()
|
|||
*/
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/loop_toggle", "f", loop_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/add_marker", "f", add_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/remove_marker", "f", remove_marker_at_playhead);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/goto_start", "f", goto_start);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/goto_end", "f", goto_end);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/rewind", "f", rewind);
|
||||
|
|
@ -395,10 +405,23 @@ OSC::register_callbacks()
|
|||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_punch_out", "f", toggle_punch_out);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/rec_enable_toggle", "f", rec_enable_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_all_rec_enables", "f", toggle_all_rec_enables);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/remove_marker", "f", remove_marker_at_playhead);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/mark_in", "f", mark_in);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/mark_out", "f", mark_out);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_click", "f", toggle_click);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/midi_panic", "f", midi_panic);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_roll", "f", toggle_roll);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/stop_forget", "f", stop_forget);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/set_punch_range", "f", set_punch_range);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/set_loop_range", "f", set_loop_range);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/set_session_range", "f", set_session_range);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_monitor_mute", "f", toggle_monitor_mute);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_monitor_dim", "f", toggle_monitor_dim);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_monitor_mono", "f", toggle_monitor_mono);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/quick_snapshot_switch", "f", quick_snapshot_switch);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/quick_snapshot_stay", "f", quick_snapshot_stay);
|
||||
|
||||
/* These commands require the route index in addition to the arg; TouchOSC (et al) can't use these */
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/mute", "ii", route_mute);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/solo", "ii", route_solo);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/recenable", "ii", route_recenable);
|
||||
|
|
|
|||
|
|
@ -175,7 +175,6 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||
}
|
||||
|
||||
PATH_CALLBACK(add_marker);
|
||||
PATH_CALLBACK(remove_marker_at_playhead);
|
||||
PATH_CALLBACK(loop_toggle);
|
||||
PATH_CALLBACK(goto_start);
|
||||
PATH_CALLBACK(goto_end);
|
||||
|
|
@ -192,9 +191,21 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||
PATH_CALLBACK(toggle_punch_out);
|
||||
PATH_CALLBACK(rec_enable_toggle);
|
||||
PATH_CALLBACK(toggle_all_rec_enables);
|
||||
PATH_CALLBACK(remove_marker_at_playhead);
|
||||
PATH_CALLBACK(mark_in);
|
||||
PATH_CALLBACK(mark_out);
|
||||
PATH_CALLBACK(toggle_click);
|
||||
PATH_CALLBACK(midi_panic);
|
||||
PATH_CALLBACK(toggle_roll);
|
||||
PATH_CALLBACK(stop_forget);
|
||||
PATH_CALLBACK(set_punch_range);
|
||||
PATH_CALLBACK(set_loop_range);
|
||||
PATH_CALLBACK(set_session_range);
|
||||
PATH_CALLBACK(toggle_monitor_mute);
|
||||
PATH_CALLBACK(toggle_monitor_dim);
|
||||
PATH_CALLBACK(toggle_monitor_mono);
|
||||
PATH_CALLBACK(quick_snapshot_stay);
|
||||
PATH_CALLBACK(quick_snapshot_switch);
|
||||
|
||||
#define PATH_CALLBACK1(name,type,optional) \
|
||||
static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue