2 Copyright (C) 2005 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <pbd/convert.h>
21 #include <pbd/stacktrace.h>
23 #include <gtkmm2ext/utils.h>
25 #include <ardour/configuration.h>
26 #include <ardour/session.h>
27 #include <ardour/audioengine.h>
30 #include <ardour/osc.h>
33 #include "ardour_ui.h"
35 #include "gui_thread.h"
36 #include "public_editor.h"
41 using namespace Gtkmm2ext;
42 using namespace ARDOUR;
47 ARDOUR_UI::toggle_time_master ()
49 ActionManager::toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master, &Configuration::get_jack_time_master);
53 ARDOUR_UI::toggle_send_mtc ()
55 ActionManager::toggle_config_state ("options", "SendMTC", &Configuration::set_send_mtc, &Configuration::get_send_mtc);
59 ARDOUR_UI::toggle_send_mmc ()
61 ActionManager::toggle_config_state ("options", "SendMMC", &Configuration::set_send_mmc, &Configuration::get_send_mmc);
65 ARDOUR_UI::toggle_use_mmc ()
67 ActionManager::toggle_config_state ("options", "UseMMC", &Configuration::set_mmc_control, &Configuration::get_mmc_control);
71 ARDOUR_UI::toggle_use_osc ()
73 ActionManager::toggle_config_state ("options", "UseOSC", &Configuration::set_use_osc, &Configuration::get_use_osc);
77 ARDOUR_UI::toggle_send_midi_feedback ()
79 ActionManager::toggle_config_state ("options", "SendMIDIfeedback", &Configuration::set_midi_feedback, &Configuration::get_midi_feedback);
83 ARDOUR_UI::toggle_denormal_protection ()
85 ActionManager::toggle_config_state ("options", "DenormalProtection", &Configuration::set_denormal_protection, &Configuration::get_denormal_protection);
89 ARDOUR_UI::toggle_only_copy_imported_files ()
91 ActionManager::toggle_config_state ("options", "OnlyCopyImportedFiles", &Configuration::set_only_copy_imported_files, &Configuration::get_only_copy_imported_files);
96 ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
98 const char *action = 0;
102 action = X_("FileHeaderFormatBWF");
105 action = X_("FileHeaderFormatWAVE");
108 action = X_("FileHeaderFormatWAVE64");
111 action = X_("FileHeaderFormatiXML");
114 action = X_("FileHeaderFormatRF64");
117 action = X_("FileHeaderFormatCAF");
120 action = X_("FileHeaderFormatAIFF");
123 fatal << string_compose (_("programming error: %1"), "illegal file header format in ::set_native_file_header_format") << endmsg;
127 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
130 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
131 if (ract && ract->get_active() && Config->get_native_file_header_format() != hf) {
132 Config->set_native_file_header_format (hf);
138 ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
140 const char* action = 0;
144 action = X_("FileDataFormatFloat");
147 action = X_("FileDataFormat24bit");
150 action = X_("FileDataFormat16bit");
153 fatal << string_compose (_("programming error: %1"), "illegal file data format in ::set_native_file_data_format") << endmsg;
157 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
160 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
161 if (ract && ract->get_active() && Config->get_native_file_data_format() != sf) {
162 Config->set_native_file_data_format (sf);
168 ARDOUR_UI::set_input_auto_connect (AutoConnectOption option)
173 case AutoConnectPhysical:
174 action = X_("InputAutoConnectPhysical");
177 action = X_("InputAutoConnectManual");
180 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
183 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
185 if (ract && ract->get_active() && Config->get_input_auto_connect() != option) {
186 Config->set_input_auto_connect (option);
192 ARDOUR_UI::set_output_auto_connect (AutoConnectOption option)
197 case AutoConnectPhysical:
198 action = X_("OutputAutoConnectPhysical");
200 case AutoConnectMaster:
201 action = X_("OutputAutoConnectMaster");
204 action = X_("OutputAutoConnectManual");
207 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
210 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
212 if (ract && ract->get_active() && Config->get_output_auto_connect() != option) {
213 Config->set_output_auto_connect (option);
219 ARDOUR_UI::set_solo_model (SoloModel model)
221 const char* action = 0;
225 action = X_("SoloViaBus");
229 action = X_("SoloInPlace");
232 fatal << string_compose (_("programming error: unknown solo model in ARDOUR_UI::set_solo_model: %1"), model) << endmsg;
236 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
239 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
241 if (ract && ract->get_active() && Config->get_solo_model() != model) {
242 Config->set_solo_model (model);
249 ARDOUR_UI::set_remote_model (RemoteModel model)
251 const char* action = 0;
255 action = X_("RemoteUserDefined");
258 action = X_("RemoteMixerDefined");
261 action = X_("RemoteEditorDefined");
265 fatal << string_compose (_("programming error: unknown remote model in ARDOUR_UI::set_remote_model: %1"), model) << endmsg;
269 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
272 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
274 if (ract && ract->get_active() && Config->get_remote_model() != model) {
275 Config->set_remote_model (model);
282 ARDOUR_UI::set_monitor_model (MonitorModel model)
284 const char* action = 0;
287 case HardwareMonitoring:
288 action = X_("UseHardwareMonitoring");
291 case SoftwareMonitoring:
292 action = X_("UseSoftwareMonitoring");
294 case ExternalMonitoring:
295 action = X_("UseExternalMonitoring");
299 fatal << string_compose (_("programming error: unknown monitor model in ARDOUR_UI::set_monitor_model: %1"), model) << endmsg;
303 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
306 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
308 if (ract && ract->get_active() && Config->get_monitoring_model() != model) {
309 Config->set_monitoring_model (model);
316 ARDOUR_UI::set_denormal_model (DenormalModel model)
318 const char* action = 0;
322 action = X_("DenormalNone");
326 action = X_("DenormalFTZ");
330 action = X_("DenormalDAZ");
334 action = X_("DenormalFTZDAZ");
338 fatal << string_compose (_("programming error: unknown denormal model in ARDOUR_UI::set_denormal_model: %1"), model) << endmsg;
342 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
345 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
347 if (ract && ract->get_active() && Config->get_denormal_model() != model) {
348 Config->set_denormal_model (model);
355 ARDOUR_UI::toggle_auto_input ()
357 ActionManager::toggle_config_state ("Transport", "ToggleAutoInput", &Configuration::set_auto_input, &Configuration::get_auto_input);
361 ARDOUR_UI::toggle_auto_play ()
363 ActionManager::toggle_config_state ("Transport", "ToggleAutoPlay", &Configuration::set_auto_play, &Configuration::get_auto_play);
367 ARDOUR_UI::toggle_auto_return ()
369 ActionManager::toggle_config_state ("Transport", "ToggleAutoReturn", &Configuration::set_auto_return, &Configuration::get_auto_return);
373 ARDOUR_UI::toggle_click ()
375 ActionManager::toggle_config_state ("Transport", "ToggleClick", &Configuration::set_clicking, &Configuration::get_clicking);
379 ARDOUR_UI::toggle_session_auto_loop ()
382 if (session->get_play_loop()) {
383 if (session->transport_rolling()) {
386 session->request_play_loop (false);
389 session->request_play_loop (true);
395 ARDOUR_UI::toggle_punch_in ()
397 ActionManager::toggle_config_state ("Transport", "TogglePunchIn", &Configuration::set_punch_in, &Configuration::get_punch_in);
401 ARDOUR_UI::toggle_punch_out ()
403 ActionManager::toggle_config_state ("Transport", "TogglePunchOut", &Configuration::set_punch_out, &Configuration::get_punch_out);
407 ARDOUR_UI::toggle_video_sync()
409 Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
411 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
412 Config->set_use_video_sync (tact->get_active());
417 ARDOUR_UI::toggle_editing_space()
419 Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
421 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
422 if (tact->get_active()) {
423 maximise_editing_space ();
425 restore_editing_space ();
431 ARDOUR_UI::toggle_StopPluginsWithTransport()
433 ActionManager::toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport, &Configuration::get_plugins_stop_with_transport);
437 ARDOUR_UI::toggle_LatchedRecordEnable()
439 ActionManager::toggle_config_state ("options", "LatchedRecordEnable", &Configuration::set_latched_record_enable, &Configuration::get_latched_record_enable);
443 ARDOUR_UI::toggle_RegionEquivalentsOverlap()
445 ActionManager::toggle_config_state ("options", "RegionEquivalentsOverlap", &Configuration::set_use_overlap_equivalency, &Configuration::get_use_overlap_equivalency);
449 ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording()
451 ActionManager::toggle_config_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::set_do_not_record_plugins, &Configuration::get_do_not_record_plugins);
455 ARDOUR_UI::toggle_VerifyRemoveLastCapture()
457 ActionManager::toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture, &Configuration::get_verify_remove_last_capture);
461 ARDOUR_UI::toggle_PeriodicSafetyBackups()
463 ActionManager::toggle_config_state ("options", "PeriodicSafetyBackups", &Configuration::set_periodic_safety_backups, &Configuration::get_periodic_safety_backups);
467 ARDOUR_UI::toggle_StopRecordingOnXrun()
469 ActionManager::toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun, &Configuration::get_stop_recording_on_xrun);
473 ARDOUR_UI::toggle_sync_order_keys ()
475 ActionManager::toggle_config_state ("options", "SyncEditorAndMixerTrackOrder", &Configuration::set_sync_all_route_ordering, &Configuration::get_sync_all_route_ordering);
479 ARDOUR_UI::toggle_StopTransportAtEndOfSession()
481 ActionManager::toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end, &Configuration::get_stop_at_session_end);
485 ARDOUR_UI::toggle_GainReduceFastTransport()
487 ActionManager::toggle_config_state ("options", "GainReduceFastTransport", &Configuration::set_quieten_at_speed, &Configuration::get_quieten_at_speed);
491 ARDOUR_UI::toggle_LatchedSolo()
493 ActionManager::toggle_config_state ("options", "LatchedSolo", &Configuration::set_solo_latched, &Configuration::get_solo_latched);
497 ARDOUR_UI::toggle_ShowSoloMutes()
499 ActionManager::toggle_config_state ("options", "ShowSoloMutes", &Configuration::set_show_solo_mutes, &Configuration::get_show_solo_mutes);
503 ARDOUR_UI::toggle_PrimaryClockDeltaEditCursor()
505 ActionManager::toggle_config_state ("options", "PrimaryClockDeltaEditCursor", &Configuration::set_primary_clock_delta_edit_cursor, &Configuration::get_primary_clock_delta_edit_cursor);
509 ARDOUR_UI::toggle_SecondaryClockDeltaEditCursor()
511 ActionManager::toggle_config_state ("options", "SecondaryClockDeltaEditCursor", &Configuration::set_secondary_clock_delta_edit_cursor, &Configuration::get_secondary_clock_delta_edit_cursor);
515 ARDOUR_UI::toggle_ShowTrackMeters()
517 ActionManager::toggle_config_state ("options", "ShowTrackMeters", &Configuration::set_show_track_meters, &Configuration::get_show_track_meters);
521 ARDOUR_UI::mtc_port_changed ()
526 if (session->mtc_port()) {
535 positional_sync_strings.clear ();
536 positional_sync_strings.push_back (slave_source_to_string (None));
538 positional_sync_strings.push_back (slave_source_to_string (MTC));
540 positional_sync_strings.push_back (slave_source_to_string (JACK));
542 set_popdown_strings (sync_option_combo, positional_sync_strings);
546 ARDOUR_UI::setup_session_options ()
550 Config->ParameterChanged.connect (mem_fun (*this, &ARDOUR_UI::parameter_changed));
555 ARDOUR_UI::map_solo_model ()
559 if (Config->get_solo_model() == InverseMute) {
560 on = X_("SoloInPlace");
562 on = X_("SoloViaBus");
565 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
567 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
569 if (tact && !tact->get_active()) {
570 tact->set_active (true);
576 ARDOUR_UI::map_monitor_model ()
580 switch (Config->get_monitoring_model()) {
581 case HardwareMonitoring:
582 on = X_("UseHardwareMonitoring");
584 case SoftwareMonitoring:
585 on = X_("UseSoftwareMonitoring");
587 case ExternalMonitoring:
588 on = X_("UseExternalMonitoring");
592 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
594 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
596 if (tact && !tact->get_active()) {
597 tact->set_active (true);
603 ARDOUR_UI::map_denormal_protection ()
605 Glib::RefPtr<Action> act = ActionManager::get_action ("options", X_("DenormalProtection"));
607 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
609 if (tact && !tact->get_active()) {
610 tact->set_active (Config->get_denormal_protection());
616 ARDOUR_UI::map_denormal_model ()
620 switch (Config->get_denormal_model()) {
622 on = X_("DenormalNone");
625 on = X_("DenormalFTZ");
628 on = X_("DenormalDAZ");
631 on = X_("DenormalFTZDAZ");
635 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
637 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
639 if (tact && !tact->get_active()) {
640 tact->set_active (true);
646 ARDOUR_UI::map_remote_model ()
650 switch (Config->get_remote_model()) {
652 on = X_("RemoteUserDefined");
655 on = X_("RemoteMixerDefined");
658 on = X_("RemoteEditorDefined");
662 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
664 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
666 if (tact && !tact->get_active()) {
667 tact->set_active (true);
673 ARDOUR_UI::map_file_header_format ()
675 const char* action = 0;
677 switch (Config->get_native_file_header_format()) {
679 action = X_("FileHeaderFormatBWF");
683 action = X_("FileHeaderFormatWAVE");
687 action = X_("FileHeaderFormatWAVE64");
691 action = X_("FileHeaderFormatiXML");
695 action = X_("FileHeaderFormatRF64");
699 action = X_("FileHeaderFormatCAF");
703 fatal << string_compose (_("programming error: unknown file header format passed to ARDOUR_UI::map_file_data_format: %1"),
704 Config->get_native_file_header_format()) << endmsg;
709 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
712 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
714 if (tact && !tact->get_active()) {
715 tact->set_active (true);
721 ARDOUR_UI::map_file_data_format ()
723 const char* action = 0;
725 switch (Config->get_native_file_data_format()) {
727 action = X_("FileDataFormatFloat");
731 action = X_("FileDataFormat24bit");
735 action = X_("FileDataFormat16bit");
739 fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"),
740 Config->get_native_file_data_format()) << endmsg;
745 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
748 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
750 if (tact && !tact->get_active()) {
751 tact->set_active (true);
757 ARDOUR_UI::map_input_auto_connect ()
761 if (Config->get_input_auto_connect() == (AutoConnectOption) 0) {
762 on = "InputAutoConnectManual";
764 on = "InputAutoConnectPhysical";
767 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
769 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
771 if (tact && !tact->get_active()) {
772 tact->set_active (true);
778 ARDOUR_UI::map_output_auto_connect ()
782 if (Config->get_output_auto_connect() == (AutoConnectOption) 0) {
783 on = "OutputAutoConnectManual";
784 } else if (Config->get_output_auto_connect() == AutoConnectPhysical) {
785 on = "OutputAutoConnectPhysical";
787 on = "OutputAutoConnectMaster";
790 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
792 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
794 if (tact && !tact->get_active()) {
795 tact->set_active (true);
801 ARDOUR_UI::map_only_copy_imported_files ()
803 Glib::RefPtr<Action> act = ActionManager::get_action ("options", X_("OnlyCopyImportedFiles"));
805 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
807 if (tact && !tact->get_active()) {
808 tact->set_active (Config->get_only_copy_imported_files());
816 ARDOUR_UI::map_meter_falloff ()
818 const char* action = X_("MeterFalloffMedium");
820 float val = Config->get_meter_falloff ();
821 MeterFalloff code = meter_falloff_from_float(val);
824 case MeterFalloffOff:
825 action = X_("MeterFalloffOff");
827 case MeterFalloffSlowest:
828 action = X_("MeterFalloffSlowest");
830 case MeterFalloffSlow:
831 action = X_("MeterFalloffSlow");
833 case MeterFalloffMedium:
834 action = X_("MeterFalloffMedium");
836 case MeterFalloffFast:
837 action = X_("MeterFalloffFast");
839 case MeterFalloffFaster:
840 action = X_("MeterFalloffFaster");
842 case MeterFalloffFastest:
843 action = X_("MeterFalloffFastest");
847 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
850 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
851 if (ract && !ract->get_active()) {
852 ract->set_active (true);
858 ARDOUR_UI::map_meter_hold ()
860 const char* action = X_("MeterHoldMedium");
862 /* XXX hack alert. Fix this. Please */
864 float val = Config->get_meter_hold ();
865 MeterHold code = (MeterHold) (int) (floor (val));
869 action = X_("MeterHoldOff");
872 action = X_("MeterHoldShort");
874 case MeterHoldMedium:
875 action = X_("MeterHoldMedium");
878 action = X_("MeterHoldLong");
882 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
885 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
886 if (ract && !ract->get_active()) {
887 ract->set_active (true);
893 ARDOUR_UI::set_meter_hold (MeterHold val)
895 const char* action = 0;
898 fval = meter_hold_to_float (val);
902 action = X_("MeterHoldOff");
905 action = X_("MeterHoldShort");
907 case MeterHoldMedium:
908 action = X_("MeterHoldMedium");
911 action = X_("MeterHoldLong");
915 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
918 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
919 if (ract && ract->get_active() && Config->get_meter_hold() != fval) {
920 Config->set_meter_hold (fval);
926 ARDOUR_UI::set_meter_falloff (MeterFalloff val)
928 const char* action = 0;
931 fval = meter_falloff_to_float (val);
934 case MeterFalloffOff:
935 action = X_("MeterFalloffOff");
937 case MeterFalloffSlowest:
938 action = X_("MeterFalloffSlowest");
940 case MeterFalloffSlow:
941 action = X_("MeterFalloffSlow");
943 case MeterFalloffMedium:
944 action = X_("MeterFalloffMedium");
946 case MeterFalloffFast:
947 action = X_("MeterFalloffFast");
949 case MeterFalloffFaster:
950 action = X_("MeterFalloffFaster");
952 case MeterFalloffFastest:
953 action = X_("MeterFalloffFastest");
957 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
960 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
961 if (ract && ract->get_active() && Config->get_meter_falloff () != fval) {
962 Config->set_meter_falloff (fval);
968 ARDOUR_UI::parameter_changed (const char* parameter_name)
970 ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::parameter_changed), parameter_name));
972 #define PARAM_IS(x) (!strcmp (parameter_name, (x)))
974 if (PARAM_IS ("slave-source")) {
976 sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
978 switch (Config->get_slave_source()) {
980 ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
981 ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
985 /* XXX need to make auto-play is off as well as insensitive */
986 ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
987 ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
991 } else if (PARAM_IS ("send-mtc")) {
993 ActionManager::map_some_state ("options", "SendMTC", &Configuration::get_send_mtc);
995 } else if (PARAM_IS ("send-mmc")) {
997 ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc);
999 } else if (PARAM_IS ("use-osc")) {
1002 if (Config->get_use_osc()) {
1009 ActionManager::map_some_state ("options", "UseOSC", &Configuration::get_use_osc);
1011 } else if (PARAM_IS ("mmc-control")) {
1012 ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control);
1013 } else if (PARAM_IS ("midi-feedback")) {
1014 ActionManager::map_some_state ("options", "SendMIDIfeedback", &Configuration::get_midi_feedback);
1015 } else if (PARAM_IS ("do-not-record-plugins")) {
1016 ActionManager::map_some_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::get_do_not_record_plugins);
1017 } else if (PARAM_IS ("latched-record-enable")) {
1018 ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
1019 } else if (PARAM_IS ("solo-latched")) {
1020 ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
1021 } else if (PARAM_IS ("show-solo-mutes")) {
1022 ActionManager::map_some_state ("options", "ShowSoloMutes", &Configuration::get_show_solo_mutes);
1023 } else if (PARAM_IS ("solo-model")) {
1025 } else if (PARAM_IS ("auto-play")) {
1026 ActionManager::map_some_state ("Transport", "ToggleAutoPlay", &Configuration::get_auto_play);
1027 } else if (PARAM_IS ("auto-return")) {
1028 ActionManager::map_some_state ("Transport", "ToggleAutoReturn", &Configuration::get_auto_return);
1029 } else if (PARAM_IS ("auto-input")) {
1030 ActionManager::map_some_state ("Transport", "ToggleAutoInput", &Configuration::get_auto_input);
1031 } else if (PARAM_IS ("punch-out")) {
1032 ActionManager::map_some_state ("Transport", "TogglePunchOut", &Configuration::get_punch_out);
1033 } else if (PARAM_IS ("punch-in")) {
1034 ActionManager::map_some_state ("Transport", "TogglePunchIn", &Configuration::get_punch_in);
1035 } else if (PARAM_IS ("clicking")) {
1036 ActionManager::map_some_state ("Transport", "ToggleClick", &Configuration::get_clicking);
1037 } else if (PARAM_IS ("jack-time-master")) {
1038 ActionManager::map_some_state ("Transport", "ToggleTimeMaster", &Configuration::get_jack_time_master);
1039 } else if (PARAM_IS ("plugins-stop-with-transport")) {
1040 ActionManager::map_some_state ("options", "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport);
1041 } else if (PARAM_IS ("latched-record-enable")) {
1042 ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
1043 } else if (PARAM_IS ("verify-remove-last-capture")) {
1044 ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
1045 } else if (PARAM_IS ("periodic-safety-backups")) {
1046 ActionManager::map_some_state ("options", "PeriodicSafetyBackups", &Configuration::get_periodic_safety_backups);
1047 } else if (PARAM_IS ("stop-recording-on-xrun")) {
1048 ActionManager::map_some_state ("options", "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun);
1049 } else if (PARAM_IS ("sync-all-route-ordering")) {
1050 ActionManager::map_some_state ("options", "SyncEditorAndMixerTrackOrder", &Configuration::get_sync_all_route_ordering);
1051 } else if (PARAM_IS ("stop-at-session-end")) {
1052 ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end);
1053 } else if (PARAM_IS ("monitoring-model")) {
1054 map_monitor_model ();
1055 } else if (PARAM_IS ("denormal-model")) {
1056 map_denormal_model ();
1057 } else if (PARAM_IS ("denormal-protection")) {
1058 map_denormal_protection ();
1059 } else if (PARAM_IS ("remote-model")) {
1060 map_remote_model ();
1061 } else if (PARAM_IS ("use-video-sync")) {
1062 ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync);
1063 } else if (PARAM_IS ("quieten-at-speed")) {
1064 ActionManager::map_some_state ("options", "GainReduceFastTransport", &Configuration::get_quieten_at_speed);
1065 } else if (PARAM_IS ("shuttle-behaviour")) {
1067 switch (Config->get_shuttle_behaviour ()) {
1069 shuttle_style_button.set_active_text (_("sprung"));
1070 shuttle_fract = 0.0;
1071 shuttle_box.queue_draw ();
1073 if (session->transport_rolling()) {
1074 shuttle_fract = SHUTTLE_FRACT_SPEED1;
1075 session->request_transport_speed (1.0);
1080 shuttle_style_button.set_active_text (_("wheel"));
1084 } else if (PARAM_IS ("shuttle-units")) {
1086 switch (Config->get_shuttle_units()) {
1088 shuttle_units_button.set_label("% ");
1091 shuttle_units_button.set_label(_("ST"));
1094 } else if (PARAM_IS ("input-auto-connect")) {
1095 map_input_auto_connect ();
1096 } else if (PARAM_IS ("output-auto-connect")) {
1097 map_output_auto_connect ();
1098 } else if (PARAM_IS ("native-file-header-format")) {
1099 map_file_header_format ();
1100 } else if (PARAM_IS ("native-file-data-format")) {
1101 map_file_data_format ();
1102 } else if (PARAM_IS ("meter-hold")) {
1104 } else if (PARAM_IS ("meter-falloff")) {
1105 map_meter_falloff ();
1106 } else if (PARAM_IS ("video-pullup") || PARAM_IS ("smpte-format")) {
1108 primary_clock.set (session->audible_frame(), true);
1109 secondary_clock.set (session->audible_frame(), true);
1111 primary_clock.set (0, true);
1112 secondary_clock.set (0, true);
1114 } else if (PARAM_IS ("use-overlap-equivalency")) {
1115 ActionManager::map_some_state ("options", "RegionEquivalentsOverlap", &Configuration::get_use_overlap_equivalency);
1116 } else if (PARAM_IS ("primary-clock-delta-edit-cursor")) {
1117 ActionManager::map_some_state ("options", "PrimaryClockDeltaEditCursor", &Configuration::get_primary_clock_delta_edit_cursor);
1118 } else if (PARAM_IS ("secondary-clock-delta-edit-cursor")) {
1119 ActionManager::map_some_state ("options", "SecondaryClockDeltaEditCursor", &Configuration::get_secondary_clock_delta_edit_cursor);
1120 } else if (PARAM_IS ("only-copy-imported-files")) {
1121 map_only_copy_imported_files ();
1122 } else if (PARAM_IS ("show-track-meters")) {
1123 ActionManager::map_some_state ("options", "ShowTrackMeters", &Configuration::get_show_track_meters);
1124 editor->toggle_meter_updating();