2 Copyright (C) 2001-2011 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.
21 #include "gtk2ardour-config.h"
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/stock.h>
26 #include <gtkmm/scale.h>
27 #include <gtkmm2ext/utils.h>
28 #include <gtkmm2ext/slider_controller.h>
29 #include <gtkmm2ext/gtk_ui.h>
34 #include "ardour/audioengine.h"
35 #include "ardour/dB.h"
36 #include "ardour/rc_configuration.h"
37 #include "ardour/control_protocol_manager.h"
38 #include "control_protocol/control_protocol.h"
40 #include "ardour_window.h"
41 #include "ardour_dialog.h"
42 #include "gui_thread.h"
43 #include "midi_tracer.h"
44 #include "rc_option_editor.h"
46 #include "midi_port_dialog.h"
53 using namespace Gtkmm2ext;
55 using namespace ARDOUR;
57 class ClickOptions : public OptionEditorBox
60 ClickOptions (RCConfiguration* c, Gtk::Window* p)
64 Table* t = manage (new Table (2, 3));
67 Label* l = manage (left_aligned_label (_("Click audio file:")));
68 t->attach (*l, 0, 1, 0, 1, FILL);
69 t->attach (_click_path_entry, 1, 2, 0, 1, FILL);
70 Button* b = manage (new Button (_("Browse...")));
71 b->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_browse_clicked));
72 t->attach (*b, 2, 3, 0, 1, FILL);
74 l = manage (left_aligned_label (_("Click emphasis audio file:")));
75 t->attach (*l, 0, 1, 1, 2, FILL);
76 t->attach (_click_emphasis_path_entry, 1, 2, 1, 2, FILL);
77 b = manage (new Button (_("Browse...")));
78 b->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked));
79 t->attach (*b, 2, 3, 1, 2, FILL);
81 _box->pack_start (*t, false, false);
83 _click_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_changed));
84 _click_emphasis_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_changed));
87 void parameter_changed (string const & p)
89 if (p == "click-sound") {
90 _click_path_entry.set_text (_rc_config->get_click_sound());
91 } else if (p == "click-emphasis-sound") {
92 _click_emphasis_path_entry.set_text (_rc_config->get_click_emphasis_sound());
96 void set_state_from_config ()
98 parameter_changed ("click-sound");
99 parameter_changed ("click-emphasis-sound");
104 void click_browse_clicked ()
106 SoundFileChooser sfdb (_("Choose Click"));
108 if (sfdb.run () == RESPONSE_OK) {
109 click_chosen (sfdb.get_filename());
113 void click_chosen (string const & path)
115 _click_path_entry.set_text (path);
116 _rc_config->set_click_sound (path);
119 void click_changed ()
121 click_chosen (_click_path_entry.get_text ());
124 void click_emphasis_browse_clicked ()
126 SoundFileChooser sfdb (_("Choose Click Emphasis"));
131 if (sfdb.run () == RESPONSE_OK) {
132 click_emphasis_chosen (sfdb.get_filename());
136 void click_emphasis_chosen (string const & path)
138 _click_emphasis_path_entry.set_text (path);
139 _rc_config->set_click_emphasis_sound (path);
142 void click_emphasis_changed ()
144 click_emphasis_chosen (_click_emphasis_path_entry.get_text ());
147 RCConfiguration* _rc_config;
148 Gtk::Window* _parent;
149 Entry _click_path_entry;
150 Entry _click_emphasis_path_entry;
153 class UndoOptions : public OptionEditorBox
156 UndoOptions (RCConfiguration* c) :
158 _limit_undo_button (_("Limit undo history to")),
159 _save_undo_button (_("Save undo history of"))
161 Table* t = new Table (2, 3);
164 t->attach (_limit_undo_button, 0, 1, 0, 1, FILL);
165 _limit_undo_spin.set_range (0, 512);
166 _limit_undo_spin.set_increments (1, 10);
167 t->attach (_limit_undo_spin, 1, 2, 0, 1, FILL | EXPAND);
168 Label* l = manage (left_aligned_label (_("commands")));
169 t->attach (*l, 2, 3, 0, 1);
171 t->attach (_save_undo_button, 0, 1, 1, 2, FILL);
172 _save_undo_spin.set_range (0, 512);
173 _save_undo_spin.set_increments (1, 10);
174 t->attach (_save_undo_spin, 1, 2, 1, 2, FILL | EXPAND);
175 l = manage (left_aligned_label (_("commands")));
176 t->attach (*l, 2, 3, 1, 2);
178 _box->pack_start (*t);
180 _limit_undo_button.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_toggled));
181 _limit_undo_spin.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_changed));
182 _save_undo_button.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_toggled));
183 _save_undo_spin.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_changed));
186 void parameter_changed (string const & p)
188 if (p == "history-depth") {
189 int32_t const d = _rc_config->get_history_depth();
190 _limit_undo_button.set_active (d != 0);
191 _limit_undo_spin.set_sensitive (d != 0);
192 _limit_undo_spin.set_value (d);
193 } else if (p == "save-history") {
194 bool const x = _rc_config->get_save_history ();
195 _save_undo_button.set_active (x);
196 _save_undo_spin.set_sensitive (x);
197 } else if (p == "save-history-depth") {
198 _save_undo_spin.set_value (_rc_config->get_saved_history_depth());
202 void set_state_from_config ()
204 parameter_changed ("save-history");
205 parameter_changed ("history-depth");
206 parameter_changed ("save-history-depth");
209 void limit_undo_toggled ()
211 bool const x = _limit_undo_button.get_active ();
212 _limit_undo_spin.set_sensitive (x);
213 int32_t const n = x ? 16 : 0;
214 _limit_undo_spin.set_value (n);
215 _rc_config->set_history_depth (n);
218 void limit_undo_changed ()
220 _rc_config->set_history_depth (_limit_undo_spin.get_value_as_int ());
223 void save_undo_toggled ()
225 bool const x = _save_undo_button.get_active ();
226 _rc_config->set_save_history (x);
229 void save_undo_changed ()
231 _rc_config->set_saved_history_depth (_save_undo_spin.get_value_as_int ());
235 RCConfiguration* _rc_config;
236 CheckButton _limit_undo_button;
237 SpinButton _limit_undo_spin;
238 CheckButton _save_undo_button;
239 SpinButton _save_undo_spin;
244 static const struct {
256 { "Key|Shift", GDK_SHIFT_MASK },
257 { "Command", GDK_META_MASK },
258 { "Control", GDK_CONTROL_MASK },
259 { "Option", GDK_MOD1_MASK },
260 { "Command-Shift", GDK_META_MASK|GDK_SHIFT_MASK },
261 { "Command-Option", GDK_MOD1_MASK|GDK_META_MASK },
262 { "Shift-Option", GDK_SHIFT_MASK|GDK_MOD1_MASK },
263 { "Shift-Command-Option", GDK_MOD5_MASK|GDK_SHIFT_MASK|GDK_META_MASK },
266 { "Key|Shift", GDK_SHIFT_MASK },
267 { "Control", GDK_CONTROL_MASK },
268 { "Alt (Mod1)", GDK_MOD1_MASK },
269 { "Control-Shift", GDK_CONTROL_MASK|GDK_SHIFT_MASK },
270 { "Control-Alt", GDK_CONTROL_MASK|GDK_MOD1_MASK },
271 { "Shift-Alt", GDK_SHIFT_MASK|GDK_MOD1_MASK },
272 { "Control-Shift-Alt", GDK_CONTROL_MASK|GDK_SHIFT_MASK|GDK_MOD1_MASK },
273 { "Mod2", GDK_MOD2_MASK },
274 { "Mod3", GDK_MOD3_MASK },
275 { "Mod4", GDK_MOD4_MASK },
276 { "Mod5", GDK_MOD5_MASK },
282 class KeyboardOptions : public OptionEditorBox
286 _delete_button_adjustment (3, 1, 12),
287 _delete_button_spin (_delete_button_adjustment),
288 _edit_button_adjustment (3, 1, 5),
289 _edit_button_spin (_edit_button_adjustment),
290 _insert_note_button_adjustment (3, 1, 5),
291 _insert_note_button_spin (_insert_note_button_adjustment)
293 /* internationalize and prepare for use with combos */
296 for (int i = 0; modifiers[i].name; ++i) {
297 dumb.push_back (S_(modifiers[i].name));
300 set_popdown_strings (_edit_modifier_combo, dumb);
301 _edit_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_modifier_chosen));
303 for (int x = 0; modifiers[x].name; ++x) {
304 if (modifiers[x].modifier == Keyboard::edit_modifier ()) {
305 _edit_modifier_combo.set_active_text (S_(modifiers[x].name));
310 Table* t = manage (new Table (4, 4));
313 Label* l = manage (left_aligned_label (_("Edit using:")));
314 l->set_name ("OptionsLabel");
316 t->attach (*l, 0, 1, 0, 1, FILL | EXPAND, FILL);
317 t->attach (_edit_modifier_combo, 1, 2, 0, 1, FILL | EXPAND, FILL);
319 l = manage (new Label (_("+ button")));
320 l->set_name ("OptionsLabel");
322 t->attach (*l, 3, 4, 0, 1, FILL | EXPAND, FILL);
323 t->attach (_edit_button_spin, 4, 5, 0, 1, FILL | EXPAND, FILL);
325 _edit_button_spin.set_name ("OptionsEntry");
326 _edit_button_adjustment.set_value (Keyboard::edit_button());
327 _edit_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_button_changed));
329 set_popdown_strings (_delete_modifier_combo, dumb);
330 _delete_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_modifier_chosen));
332 for (int x = 0; modifiers[x].name; ++x) {
333 if (modifiers[x].modifier == Keyboard::delete_modifier ()) {
334 _delete_modifier_combo.set_active_text (S_(modifiers[x].name));
339 l = manage (left_aligned_label (_("Delete using:")));
340 l->set_name ("OptionsLabel");
342 t->attach (*l, 0, 1, 1, 2, FILL | EXPAND, FILL);
343 t->attach (_delete_modifier_combo, 1, 2, 1, 2, FILL | EXPAND, FILL);
345 l = manage (new Label (_("+ button")));
346 l->set_name ("OptionsLabel");
348 t->attach (*l, 3, 4, 1, 2, FILL | EXPAND, FILL);
349 t->attach (_delete_button_spin, 4, 5, 1, 2, FILL | EXPAND, FILL);
351 _delete_button_spin.set_name ("OptionsEntry");
352 _delete_button_adjustment.set_value (Keyboard::delete_button());
353 _delete_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed));
356 set_popdown_strings (_insert_note_modifier_combo, dumb);
357 _insert_note_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen));
359 for (int x = 0; modifiers[x].name; ++x) {
360 if (modifiers[x].modifier == Keyboard::insert_note_modifier ()) {
361 _insert_note_modifier_combo.set_active_text (S_(modifiers[x].name));
366 l = manage (left_aligned_label (_("Insert note using:")));
367 l->set_name ("OptionsLabel");
369 t->attach (*l, 0, 1, 2, 3, FILL | EXPAND, FILL);
370 t->attach (_insert_note_modifier_combo, 1, 2, 2, 3, FILL | EXPAND, FILL);
372 l = manage (new Label (_("+ button")));
373 l->set_name ("OptionsLabel");
375 t->attach (*l, 3, 4, 2, 3, FILL | EXPAND, FILL);
376 t->attach (_insert_note_button_spin, 4, 5, 2, 3, FILL | EXPAND, FILL);
378 _insert_note_button_spin.set_name ("OptionsEntry");
379 _insert_note_button_adjustment.set_value (Keyboard::insert_note_button());
380 _insert_note_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed));
383 set_popdown_strings (_snap_modifier_combo, dumb);
384 _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen));
386 for (int x = 0; modifiers[x].name; ++x) {
387 if (modifiers[x].modifier == (guint) Keyboard::snap_modifier ()) {
388 _snap_modifier_combo.set_active_text (S_(modifiers[x].name));
393 l = manage (left_aligned_label (_("Ignore snap using:")));
394 l->set_name ("OptionsLabel");
396 t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL);
397 t->attach (_snap_modifier_combo, 1, 2, 3, 4, FILL | EXPAND, FILL);
401 for (map<string,string>::iterator bf = Keyboard::binding_files.begin(); bf != Keyboard::binding_files.end(); ++bf) {
402 strs.push_back (bf->first);
405 set_popdown_strings (_keyboard_layout_selector, strs);
406 _keyboard_layout_selector.set_active_text (Keyboard::current_binding_name());
407 _keyboard_layout_selector.signal_changed().connect (sigc::mem_fun (*this, &KeyboardOptions::bindings_changed));
409 l = manage (left_aligned_label (_("Keyboard layout:")));
410 l->set_name ("OptionsLabel");
412 t->attach (*l, 0, 1, 4, 5, FILL | EXPAND, FILL);
413 t->attach (_keyboard_layout_selector, 1, 2, 4, 5, FILL | EXPAND, FILL);
415 _box->pack_start (*t, false, false);
418 void parameter_changed (string const &)
420 /* XXX: these aren't really config options... */
423 void set_state_from_config ()
425 /* XXX: these aren't really config options... */
430 void bindings_changed ()
432 string const txt = _keyboard_layout_selector.get_active_text();
434 /* XXX: config...? for all this keyboard stuff */
436 for (map<string,string>::iterator i = Keyboard::binding_files.begin(); i != Keyboard::binding_files.end(); ++i) {
437 if (txt == i->first) {
438 if (Keyboard::load_keybindings (i->second)) {
439 Keyboard::save_keybindings ();
445 void edit_modifier_chosen ()
447 string const txt = _edit_modifier_combo.get_active_text();
449 for (int i = 0; modifiers[i].name; ++i) {
450 if (txt == _(modifiers[i].name)) {
451 Keyboard::set_edit_modifier (modifiers[i].modifier);
457 void delete_modifier_chosen ()
459 string const txt = _delete_modifier_combo.get_active_text();
461 for (int i = 0; modifiers[i].name; ++i) {
462 if (txt == _(modifiers[i].name)) {
463 Keyboard::set_delete_modifier (modifiers[i].modifier);
469 void insert_note_modifier_chosen ()
471 string const txt = _insert_note_modifier_combo.get_active_text();
473 for (int i = 0; modifiers[i].name; ++i) {
474 if (txt == _(modifiers[i].name)) {
475 Keyboard::set_insert_note_modifier (modifiers[i].modifier);
481 void snap_modifier_chosen ()
483 string const txt = _snap_modifier_combo.get_active_text();
485 for (int i = 0; modifiers[i].name; ++i) {
486 if (txt == _(modifiers[i].name)) {
487 Keyboard::set_snap_modifier (modifiers[i].modifier);
493 void delete_button_changed ()
495 Keyboard::set_delete_button (_delete_button_spin.get_value_as_int());
498 void edit_button_changed ()
500 Keyboard::set_edit_button (_edit_button_spin.get_value_as_int());
503 void insert_note_button_changed ()
505 Keyboard::set_insert_note_button (_insert_note_button_spin.get_value_as_int());
508 ComboBoxText _keyboard_layout_selector;
509 ComboBoxText _edit_modifier_combo;
510 ComboBoxText _delete_modifier_combo;
511 ComboBoxText _insert_note_modifier_combo;
512 ComboBoxText _snap_modifier_combo;
513 Adjustment _delete_button_adjustment;
514 SpinButton _delete_button_spin;
515 Adjustment _edit_button_adjustment;
516 SpinButton _edit_button_spin;
517 Adjustment _insert_note_button_adjustment;
518 SpinButton _insert_note_button_spin;
522 class FontScalingOptions : public OptionEditorBox
525 FontScalingOptions (RCConfiguration* c) :
527 _dpi_adjustment (50, 50, 250, 1, 10),
528 _dpi_slider (_dpi_adjustment)
530 _dpi_adjustment.set_value (floor (_rc_config->get_font_scale () / 1024));
532 Label* l = manage (new Label (_("Font scaling:")));
533 l->set_name ("OptionsLabel");
535 _dpi_slider.set_update_policy (UPDATE_DISCONTINUOUS);
536 HBox* h = manage (new HBox);
538 h->pack_start (*l, false, false);
539 h->pack_start (_dpi_slider, true, true);
541 _box->pack_start (*h, false, false);
543 _dpi_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &FontScalingOptions::dpi_changed));
546 void parameter_changed (string const & p)
548 if (p == "font-scale") {
549 _dpi_adjustment.set_value (floor (_rc_config->get_font_scale() / 1024));
553 void set_state_from_config ()
555 parameter_changed ("font-scale");
562 _rc_config->set_font_scale ((long) floor (_dpi_adjustment.get_value() * 1024));
563 /* XXX: should be triggered from the parameter changed signal */
567 RCConfiguration* _rc_config;
568 Adjustment _dpi_adjustment;
572 class BufferingOptions : public OptionEditorBox
575 BufferingOptions (RCConfiguration* c)
577 , _playback_adjustment (5, 1, 60, 1, 4)
578 , _capture_adjustment (5, 1, 60, 1, 4)
579 , _playback_slider (_playback_adjustment)
580 , _capture_slider (_capture_adjustment)
582 _playback_adjustment.set_value (_rc_config->get_audio_playback_buffer_seconds());
584 Label* l = manage (new Label (_("Playback (seconds of buffering):")));
585 l->set_name ("OptionsLabel");
587 _playback_slider.set_update_policy (UPDATE_DISCONTINUOUS);
588 HBox* h = manage (new HBox);
590 h->pack_start (*l, false, false);
591 h->pack_start (_playback_slider, true, true);
593 _box->pack_start (*h, false, false);
595 _capture_adjustment.set_value (_rc_config->get_audio_capture_buffer_seconds());
597 l = manage (new Label (_("Recording (seconds of buffering):")));
598 l->set_name ("OptionsLabel");
600 _capture_slider.set_update_policy (UPDATE_DISCONTINUOUS);
601 h = manage (new HBox);
603 h->pack_start (*l, false, false);
604 h->pack_start (_capture_slider, true, true);
606 _box->pack_start (*h, false, false);
608 _capture_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::capture_changed));
609 _playback_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::playback_changed));
612 void parameter_changed (string const & p)
614 if (p == "playback-buffer-seconds") {
615 _playback_adjustment.set_value (_rc_config->get_audio_playback_buffer_seconds());
616 } else if (p == "capture-buffer-seconds") {
617 _capture_adjustment.set_value (_rc_config->get_audio_capture_buffer_seconds());
621 void set_state_from_config ()
623 parameter_changed ("playback-buffer-seconds");
624 parameter_changed ("capture-buffer-seconds");
629 void playback_changed ()
631 _rc_config->set_audio_playback_buffer_seconds ((long) _playback_adjustment.get_value());
634 void capture_changed ()
636 _rc_config->set_audio_capture_buffer_seconds ((long) _capture_adjustment.get_value());
639 RCConfiguration* _rc_config;
640 Adjustment _playback_adjustment;
641 Adjustment _capture_adjustment;
642 HScale _playback_slider;
643 HScale _capture_slider;
646 class ControlSurfacesOptions : public OptionEditorBox
649 ControlSurfacesOptions (Gtk::Window& parent)
652 _store = ListStore::create (_model);
653 _view.set_model (_store);
654 _view.append_column (_("Control Surface Protocol"), _model.name);
655 _view.get_column(0)->set_resizable (true);
656 _view.get_column(0)->set_expand (true);
657 _view.append_column_editable (_("Enabled"), _model.enabled);
658 _view.append_column_editable (_("Feedback"), _model.feedback);
660 _box->pack_start (_view, false, false);
662 Label* label = manage (new Label);
663 label->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
665 _box->pack_start (*label, false, false);
668 ControlProtocolManager& m = ControlProtocolManager::instance ();
669 m.ProtocolStatusChange.connect (protocol_status_connection, MISSING_INVALIDATOR,
670 boost::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context());
672 _store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::view_changed));
673 _view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked));
676 void parameter_changed (std::string const &)
681 void set_state_from_config ()
685 ControlProtocolManager& m = ControlProtocolManager::instance ();
686 for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
688 if (!(*i)->mandatory) {
689 TreeModel::Row r = *_store->append ();
690 r[_model.name] = (*i)->name;
691 r[_model.enabled] = ((*i)->protocol || (*i)->requested);
692 r[_model.feedback] = ((*i)->protocol && (*i)->protocol->get_feedback ());
693 r[_model.protocol_info] = *i;
700 void protocol_status_changed (ControlProtocolInfo* cpi) {
702 TreeModel::Children rows = _store->children();
703 for (TreeModel::Children::iterator x = rows.begin(); x != rows.end(); ++x) {
704 if ((*x)[_model.protocol_info] == cpi) {
705 (*x)[_model.enabled] = (cpi->protocol || cpi->requested);
711 void view_changed (TreeModel::Path const &, TreeModel::iterator const & i)
713 TreeModel::Row r = *i;
715 ControlProtocolInfo* cpi = r[_model.protocol_info];
720 bool const was_enabled = (cpi->protocol != 0);
721 bool const is_enabled = r[_model.enabled];
723 if (was_enabled != is_enabled) {
725 ControlProtocolManager::instance().instantiate (*cpi);
727 Gtk::Window* win = r[_model.editor];
732 ControlProtocolManager::instance().teardown (*cpi);
737 r[_model.editor] = 0;
738 cpi->requested = false;
742 bool const was_feedback = (cpi->protocol && cpi->protocol->get_feedback ());
743 bool const is_feedback = r[_model.feedback];
745 if (was_feedback != is_feedback && cpi->protocol) {
746 cpi->protocol->set_feedback (is_feedback);
750 void edit_clicked (GdkEventButton* ev)
752 if (ev->type != GDK_2BUTTON_PRESS) {
757 ControlProtocolInfo* cpi;
760 row = *(_view.get_selection()->get_selected());
762 Window* win = row[_model.editor];
763 if (win && !win->is_visible()) {
766 cpi = row[_model.protocol_info];
768 if (cpi && cpi->protocol && cpi->protocol->has_editor ()) {
769 Box* box = (Box*) cpi->protocol->get_gui ();
771 string title = row[_model.name];
772 ArdourWindow* win = new ArdourWindow (_parent, title);
773 win->set_title ("Control Protocol Options");
777 row[_model.editor] = win;
783 class ControlSurfacesModelColumns : public TreeModelColumnRecord
787 ControlSurfacesModelColumns ()
796 TreeModelColumn<string> name;
797 TreeModelColumn<bool> enabled;
798 TreeModelColumn<bool> feedback;
799 TreeModelColumn<ControlProtocolInfo*> protocol_info;
800 TreeModelColumn<Gtk::Window*> editor;
803 Glib::RefPtr<ListStore> _store;
804 ControlSurfacesModelColumns _model;
806 Gtk::Window& _parent;
807 PBD::ScopedConnection protocol_status_connection;
810 class VideoTimelineOptions : public OptionEditorBox
813 VideoTimelineOptions (RCConfiguration* c)
815 , _show_video_export_info_button (_("Show Video Export Info before export"))
816 , _show_video_server_dialog_button (_("Show Video Server Startup Dialog"))
817 , _video_advanced_setup_button (_("Advanced Setup (remote video server)"))
819 Table* t = manage (new Table (2, 6));
822 t->attach (_video_advanced_setup_button, 0, 2, 0, 1);
823 _video_advanced_setup_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::video_advanced_setup_toggled));
824 Gtkmm2ext::UI::instance()->set_tip (_video_advanced_setup_button,
825 _("<b>When enabled</b> you can speficify a custom video-server URL and docroot. - Do not enable this option unless you know what you are doing."));
827 Label* l = manage (new Label (_("Video Server URL:")));
828 l->set_alignment (0, 0.5);
829 t->attach (*l, 0, 1, 1, 2, FILL);
830 t->attach (_video_server_url_entry, 1, 2, 1, 2, FILL);
831 Gtkmm2ext::UI::instance()->set_tip (_video_server_url_entry,
832 _("Base URL of the video-server including http prefix. This is usually 'http://hostname.example.org:1554/' and defaults to 'http://localhost:1554/' when the video-server is running locally"));
834 l = manage (new Label (_("Video Folder:")));
835 l->set_alignment (0, 0.5);
836 t->attach (*l, 0, 1, 2, 3, FILL);
837 t->attach (_video_server_docroot_entry, 1, 2, 2, 3);
838 Gtkmm2ext::UI::instance()->set_tip (_video_server_docroot_entry,
839 _("Local path to the video-server document-root. Only files below this directory will be accessible by the video-server. If the server run on a remote host, it should point to a network mounted folder of the server's docroot or be left empty if it is unvailable. It is used for the local video-monitor and file-browsing when opening/adding a video file."));
841 /* small vspace y=3..4 */
843 t->attach (_show_video_export_info_button, 0, 2, 4, 5);
844 _show_video_export_info_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_export_info_toggled));
845 Gtkmm2ext::UI::instance()->set_tip (_show_video_export_info_button,
846 _("<b>When enabled</b> an information window with details is displayed before the video-export dialog."));
848 t->attach (_show_video_server_dialog_button, 0, 2, 5, 6);
849 _show_video_server_dialog_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_server_dialog_toggled));
850 Gtkmm2ext::UI::instance()->set_tip (_show_video_server_dialog_button,
851 _("<b>When enabled</b> the video server is never launched automatically without confirmation"));
853 _video_server_url_entry.signal_changed().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_url_changed));
854 _video_server_url_entry.signal_activate().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_url_changed));
855 _video_server_docroot_entry.signal_changed().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_docroot_changed));
856 _video_server_docroot_entry.signal_activate().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_docroot_changed));
858 _box->pack_start (*t,true,true);
861 void server_url_changed ()
863 _rc_config->set_video_server_url (_video_server_url_entry.get_text());
866 void server_docroot_changed ()
868 _rc_config->set_video_server_docroot (_video_server_docroot_entry.get_text());
871 void show_video_export_info_toggled ()
873 bool const x = _show_video_export_info_button.get_active ();
874 _rc_config->set_show_video_export_info (x);
877 void show_video_server_dialog_toggled ()
879 bool const x = _show_video_server_dialog_button.get_active ();
880 _rc_config->set_show_video_server_dialog (x);
883 void video_advanced_setup_toggled ()
885 bool const x = _video_advanced_setup_button.get_active ();
886 _rc_config->set_video_advanced_setup(x);
889 void parameter_changed (string const & p)
891 if (p == "video-server-url") {
892 _video_server_url_entry.set_text (_rc_config->get_video_server_url());
893 } else if (p == "video-server-docroot") {
894 _video_server_docroot_entry.set_text (_rc_config->get_video_server_docroot());
895 } else if (p == "show-video-export-info") {
896 bool const x = _rc_config->get_show_video_export_info();
897 _show_video_export_info_button.set_active (x);
898 } else if (p == "show-video-server-dialog") {
899 bool const x = _rc_config->get_show_video_server_dialog();
900 _show_video_server_dialog_button.set_active (x);
901 } else if (p == "video-advanced-setup") {
902 bool const x = _rc_config->get_video_advanced_setup();
903 _video_advanced_setup_button.set_active(x);
904 _video_server_docroot_entry.set_sensitive(x);
905 _video_server_url_entry.set_sensitive(x);
909 void set_state_from_config ()
911 parameter_changed ("video-server-url");
912 parameter_changed ("video-server-docroot");
913 parameter_changed ("video-monitor-setup-dialog");
914 parameter_changed ("show-video-export-info");
915 parameter_changed ("show-video-server-dialog");
916 parameter_changed ("video-advanced-setup");
920 RCConfiguration* _rc_config;
921 Entry _video_server_url_entry;
922 Entry _video_server_docroot_entry;
923 CheckButton _show_video_export_info_button;
924 CheckButton _show_video_server_dialog_button;
925 CheckButton _video_advanced_setup_button;
928 /** A class which allows control of visibility of some editor components usign
929 * a VisibilityGroup. The caller should pass in a `dummy' VisibilityGroup
930 * which has the correct members, but with null widget pointers. This
931 * class allows the user to set visibility of the members, the details
932 * of which are stored in a configuration variable which can be watched
933 * by parts of the editor that actually contain the widgets whose visibility
934 * is being controlled.
937 class VisibilityOption : public Option
940 /** @param name User-visible name for this group.
941 * @param g `Dummy' VisibilityGroup (as described above).
942 * @param get Method to get the value of the appropriate configuration variable.
943 * @param set Method to set the value of the appropriate configuration variable.
945 VisibilityOption (string name, VisibilityGroup* g, sigc::slot<string> get, sigc::slot<bool, string> set)
946 : Option (g->get_state_name(), name)
948 , _visibility_group (g)
952 /* Watch for changes made by the user to our members */
953 _visibility_group->VisibilityChanged.connect_same_thread (
954 _visibility_group_connection, sigc::bind (&VisibilityOption::changed, this)
958 void set_state_from_config ()
960 /* Set our state from the current configuration */
961 _visibility_group->set_state (_get ());
964 void add_to_page (OptionEditorPage* p)
966 _heading.add_to_page (p);
967 add_widget_to_page (p, _visibility_group->list_view ());
970 Gtk::Widget& tip_widget() { return *_visibility_group->list_view (); }
975 /* The user has changed something, so reflect this change
976 in the RCConfiguration.
978 _set (_visibility_group->get_state_value ());
981 OptionEditorHeading _heading;
982 VisibilityGroup* _visibility_group;
983 sigc::slot<std::string> _get;
984 sigc::slot<bool, std::string> _set;
985 PBD::ScopedConnection _visibility_group_connection;
990 RCOptionEditor::RCOptionEditor ()
991 : OptionEditor (Config, string_compose (_("%1 Preferences"), PROGRAM_NAME))
992 , _rc_config (Config)
993 , _mixer_strip_visibility ("mixer-strip-visibility")
997 uint32_t hwcpus = hardware_concurrency ();
999 BoolComboOption* bco;
1002 add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization")));
1004 ComboOption<int32_t>* procs = new ComboOption<int32_t> (
1006 _("Signal processing uses"),
1007 sigc::mem_fun (*_rc_config, &RCConfiguration::get_processor_usage),
1008 sigc::mem_fun (*_rc_config, &RCConfiguration::set_processor_usage)
1011 procs->add (-1, _("all but one processor"));
1012 procs->add (0, _("all available processors"));
1014 for (uint32_t i = 1; i <= hwcpus; ++i) {
1015 procs->add (i, string_compose (_("%1 processors"), i));
1018 procs->set_note (string_compose (_("This setting will only take effect when %1 is restarted."), PROGRAM_NAME));
1020 add_option (_("Misc"), procs);
1023 add_option (_("Misc"), new OptionEditorHeading (S_("Options|Undo")));
1025 add_option (_("Misc"), new UndoOptions (_rc_config));
1027 add_option (_("Misc"),
1029 "verify-remove-last-capture",
1030 _("Verify removal of last capture"),
1031 sigc::mem_fun (*_rc_config, &RCConfiguration::get_verify_remove_last_capture),
1032 sigc::mem_fun (*_rc_config, &RCConfiguration::set_verify_remove_last_capture)
1035 add_option (_("Misc"),
1037 "periodic-safety-backups",
1038 _("Make periodic backups of the session file"),
1039 sigc::mem_fun (*_rc_config, &RCConfiguration::get_periodic_safety_backups),
1040 sigc::mem_fun (*_rc_config, &RCConfiguration::set_periodic_safety_backups)
1043 add_option (_("Misc"), new OptionEditorHeading (_("Session Management")));
1045 add_option (_("Misc"),
1047 "only-copy-imported-files",
1048 _("Always copy imported files"),
1049 sigc::mem_fun (*_rc_config, &RCConfiguration::get_only_copy_imported_files),
1050 sigc::mem_fun (*_rc_config, &RCConfiguration::set_only_copy_imported_files)
1053 add_option (_("Misc"), new DirectoryOption (
1054 X_("default-session-parent-dir"),
1055 _("Default folder for new sessions:"),
1056 sigc::mem_fun (*_rc_config, &RCConfiguration::get_default_session_parent_dir),
1057 sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_session_parent_dir)
1060 add_option (_("Misc"),
1061 new SpinOption<uint32_t> (
1062 "max-recent-sessions",
1063 _("Maximum number of recent sessions"),
1064 sigc::mem_fun (*_rc_config, &RCConfiguration::get_max_recent_sessions),
1065 sigc::mem_fun (*_rc_config, &RCConfiguration::set_max_recent_sessions),
1069 add_option (_("Misc"), new OptionEditorHeading (_("Click")));
1071 add_option (_("Misc"), new ClickOptions (_rc_config, this));
1073 add_option (_("Misc"),
1076 _("Click gain level"),
1077 sigc::mem_fun (*_rc_config, &RCConfiguration::get_click_gain),
1078 sigc::mem_fun (*_rc_config, &RCConfiguration::set_click_gain)
1081 add_option (_("Misc"), new OptionEditorHeading (_("Automation")));
1083 add_option (_("Misc"),
1084 new SpinOption<double> (
1085 "automation-thinning-factor",
1086 _("Thinning factor (larger value => less data)"),
1087 sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_thinning_factor),
1088 sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_thinning_factor),
1092 add_option (_("Misc"),
1093 new SpinOption<double> (
1094 "automation-interval-msecs",
1095 _("Automation sampling interval (milliseconds)"),
1096 sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_interval_msecs),
1097 sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_interval_msecs),
1105 tsf = new BoolOption (
1106 "latched-record-enable",
1107 _("Keep record-enable engaged on stop"),
1108 sigc::mem_fun (*_rc_config, &RCConfiguration::get_latched_record_enable),
1109 sigc::mem_fun (*_rc_config, &RCConfiguration::set_latched_record_enable)
1111 // Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _(""));
1112 add_option (_("Transport"), tsf);
1114 tsf = new BoolOption (
1115 "stop-recording-on-xrun",
1116 _("Stop recording when an xrun occurs"),
1117 sigc::mem_fun (*_rc_config, &RCConfiguration::get_stop_recording_on_xrun),
1118 sigc::mem_fun (*_rc_config, &RCConfiguration::set_stop_recording_on_xrun)
1120 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
1121 string_compose (_("<b>When enabled</b> %1 will stop recording if an over- or underrun is detected by the audio engine"),
1123 add_option (_("Transport"), tsf);
1125 tsf = new BoolOption (
1126 "create-xrun-marker",
1127 _("Create markers where xruns occur"),
1128 sigc::mem_fun (*_rc_config, &RCConfiguration::get_create_xrun_marker),
1129 sigc::mem_fun (*_rc_config, &RCConfiguration::set_create_xrun_marker)
1131 // Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _(""));
1132 add_option (_("Transport"), tsf);
1134 tsf = new BoolOption (
1135 "stop-at-session-end",
1136 _("Stop at the end of the session"),
1137 sigc::mem_fun (*_rc_config, &RCConfiguration::get_stop_at_session_end),
1138 sigc::mem_fun (*_rc_config, &RCConfiguration::set_stop_at_session_end)
1140 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
1141 string_compose (_("<b>When enabled</b> if %1 is <b>not recording</b>, it will stop the transport "
1142 "when it reaches the current session end marker\n\n"
1143 "<b>When disabled</b> %1 will continue to roll past the session end marker at all times"),
1145 add_option (_("Transport"), tsf);
1147 tsf = new BoolOption (
1149 _("Do seamless looping (not possible when slaved to MTC, LTC etc)"),
1150 sigc::mem_fun (*_rc_config, &RCConfiguration::get_seamless_loop),
1151 sigc::mem_fun (*_rc_config, &RCConfiguration::set_seamless_loop)
1153 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
1154 string_compose (_("<b>When enabled</b> this will loop by reading ahead and wrapping around at the loop point, "
1155 "preventing any need to do a transport locate at the end of the loop\n\n"
1156 "<b>When disabled</b> looping is done by locating back to the start of the loop when %1 reaches the end "
1157 "which will often cause a small click or delay"), PROGRAM_NAME));
1158 add_option (_("Transport"), tsf);
1160 tsf = new BoolOption (
1161 "disable-disarm-during-roll",
1162 _("Disable per-track record disarm while rolling"),
1163 sigc::mem_fun (*_rc_config, &RCConfiguration::get_disable_disarm_during_roll),
1164 sigc::mem_fun (*_rc_config, &RCConfiguration::set_disable_disarm_during_roll)
1166 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _("<b>When enabled</b> this will prevent you from accidentally stopping specific tracks recording during a take"));
1167 add_option (_("Transport"), tsf);
1169 tsf = new BoolOption (
1171 _("12dB gain reduction during fast-forward and fast-rewind"),
1172 sigc::mem_fun (*_rc_config, &RCConfiguration::get_quieten_at_speed),
1173 sigc::mem_fun (*_rc_config, &RCConfiguration::set_quieten_at_speed)
1175 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _("This will reduce the unpleasant increase in perceived volume "
1176 "that occurs when fast-forwarding or rewinding through some kinds of audio"));
1177 add_option (_("Transport"), tsf);
1179 add_option (_("Transport"), new OptionEditorHeading (S_("Sync/Slave")));
1181 _sync_source = new ComboOption<SyncSource> (
1183 _("External timecode source"),
1184 sigc::mem_fun (*_rc_config, &RCConfiguration::get_sync_source),
1185 sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_source)
1188 populate_sync_options ();
1189 add_option (_("Transport"), _sync_source);
1191 _sync_framerate = new BoolOption (
1192 "timecode-sync-frame-rate",
1193 _("Match session video frame rate to external timecode"),
1194 sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_sync_frame_rate),
1195 sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_sync_frame_rate)
1197 Gtkmm2ext::UI::instance()->set_tip
1198 (_sync_framerate->tip_widget(),
1199 string_compose (_("This option controls the value of the video frame rate <i>while chasing</i> an external timecode source.\n\n"
1200 "<b>When enabled</b> the session video frame rate will be changed to match that of the selected external timecode source.\n\n"
1201 "<b>When disabled</b> the session video frame rate will not be changed to match that of the selected external timecode source."
1202 "Instead the frame rate indication in the main clock will flash red and %1 will convert between the external "
1203 "timecode standard and the session standard."), PROGRAM_NAME));
1205 add_option (_("Transport"), _sync_framerate);
1207 _sync_genlock = new BoolOption (
1208 "timecode-source-is-synced",
1209 _("External timecode is sync locked"),
1210 sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_source_is_synced),
1211 sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_source_is_synced)
1213 Gtkmm2ext::UI::instance()->set_tip
1214 (_sync_genlock->tip_widget(),
1215 _("<b>When enabled</b> indicates that the selected external timecode source shares sync (Black & Burst, Wordclock, etc) with the audio interface."));
1218 add_option (_("Transport"), _sync_genlock);
1220 _sync_source_2997 = new BoolOption (
1221 "timecode-source-2997",
1222 _("Lock to 29.9700 fps instead of 30000/1001"),
1223 sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_source_2997),
1224 sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_source_2997)
1226 Gtkmm2ext::UI::instance()->set_tip
1227 (_sync_source_2997->tip_widget(),
1228 _("<b>When enabled</b> the external timecode source is assumed to use 29.97 fps instead of 30000/1001.\n"
1229 "SMPTE 12M-1999 specifies 29.97df as 30000/1001. The spec further mentions that "
1230 "drop-frame timecode has an accumulated error of -86ms over a 24-hour period.\n"
1231 "Drop-frame timecode would compensate exactly for a NTSC color frame rate of 30 * 0.9990 (ie 29.970000). "
1232 "That is not the actual rate. However, some vendors use that rate - despite it being against the specs - "
1233 "because the variant of using exactly 29.97 fps has zero timecode drift.\n"
1236 add_option (_("Transport"), _sync_source_2997);
1238 add_option (_("Transport"), new OptionEditorHeading (S_("LTC Reader")));
1240 _ltc_port = new ComboStringOption (
1242 _("LTC incoming port"),
1243 sigc::mem_fun (*_rc_config, &RCConfiguration::get_ltc_source_port),
1244 sigc::mem_fun (*_rc_config, &RCConfiguration::set_ltc_source_port)
1247 vector<string> physical_inputs;
1248 physical_inputs.push_back (_("None"));
1249 AudioEngine::instance()->get_physical_inputs (DataType::AUDIO, physical_inputs);
1250 _ltc_port->set_popdown_strings (physical_inputs);
1252 add_option (_("Transport"), _ltc_port);
1254 // TODO; rather disable this button than not compile it..
1255 add_option (_("Transport"), new OptionEditorHeading (S_("LTC Generator")));
1257 add_option (_("Transport"),
1260 _("Enable LTC generator"),
1261 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_ltc),
1262 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_ltc)
1265 _ltc_send_continuously = new BoolOption (
1266 "ltc-send-continuously",
1267 _("send LTC while stopped"),
1268 sigc::mem_fun (*_rc_config, &RCConfiguration::get_ltc_send_continuously),
1269 sigc::mem_fun (*_rc_config, &RCConfiguration::set_ltc_send_continuously)
1271 Gtkmm2ext::UI::instance()->set_tip
1272 (_ltc_send_continuously->tip_widget(),
1273 string_compose (_("<b>When enabled</b> %1 will continue to send LTC information even when the transport (playhead) is not moving"), PROGRAM_NAME));
1274 add_option (_("Transport"), _ltc_send_continuously);
1276 _ltc_volume_adjustment = new Gtk::Adjustment(-18, -50, 0, .5, 5);
1277 _ltc_volume_adjustment->set_value (20 * log10(_rc_config->get_ltc_output_volume()));
1278 _ltc_volume_adjustment->signal_value_changed().connect (sigc::mem_fun (*this, &RCOptionEditor::ltc_generator_volume_changed));
1279 _ltc_volume_slider = new HSliderOption("ltcvol", _("LTC generator level"), *_ltc_volume_adjustment);
1281 Gtkmm2ext::UI::instance()->set_tip
1282 (_ltc_volume_slider->tip_widget(),
1283 _("Specify the Peak Volume of the generated LTC signal in dbFS. A good value is 0dBu ^= -18dbFS in an EBU calibrated system"));
1285 add_option (_("Transport"), _ltc_volume_slider);
1286 parameter_changed ("send-ltc");
1288 parameter_changed ("sync-source");
1292 add_option (_("Editor"),
1294 "link-region-and-track-selection",
1295 _("Link selection of regions and tracks"),
1296 sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_region_and_track_selection),
1297 sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_region_and_track_selection)
1300 add_option (_("Editor"),
1302 "automation-follows-regions",
1303 _("Move relevant automation when audio regions are moved"),
1304 sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_follows_regions),
1305 sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_follows_regions)
1308 add_option (_("Editor"),
1310 "show-track-meters",
1311 _("Show meters on tracks in the editor"),
1312 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_track_meters),
1313 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_track_meters)
1316 add_option (_("Editor"),
1318 "show-editor-meter",
1319 _("Display master-meter in the toolbar"),
1320 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_editor_meter),
1321 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_editor_meter)
1324 bco = new BoolComboOption (
1325 "use-overlap-equivalency",
1326 _("Regions in active edit groups are edited together"),
1327 _("whenever they overlap in time"),
1328 _("only if they have identical length, position and origin"),
1329 sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_overlap_equivalency),
1330 sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_overlap_equivalency)
1333 add_option (_("Editor"), bco);
1335 add_option (_("Editor"),
1337 "rubberbanding-snaps-to-grid",
1338 _("Make rubberband selection rectangle snap to the grid"),
1339 sigc::mem_fun (*_rc_config, &RCConfiguration::get_rubberbanding_snaps_to_grid),
1340 sigc::mem_fun (*_rc_config, &RCConfiguration::set_rubberbanding_snaps_to_grid)
1343 add_option (_("Editor"),
1346 _("Show waveforms in regions"),
1347 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_waveforms),
1348 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms)
1351 add_option (_("Editor"),
1352 new BoolComboOption (
1353 "show-region-gain-envelopes",
1354 _("Show gain envelopes in audio regions"),
1356 _("only in region gain mode"),
1357 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_region_gain),
1358 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_region_gain)
1361 ComboOption<WaveformScale>* wfs = new ComboOption<WaveformScale> (
1363 _("Waveform scale"),
1364 sigc::mem_fun (*_rc_config, &RCConfiguration::get_waveform_scale),
1365 sigc::mem_fun (*_rc_config, &RCConfiguration::set_waveform_scale)
1368 wfs->add (Linear, _("linear"));
1369 wfs->add (Logarithmic, _("logarithmic"));
1371 add_option (_("Editor"), wfs);
1373 ComboOption<WaveformShape>* wfsh = new ComboOption<WaveformShape> (
1375 _("Waveform shape"),
1376 sigc::mem_fun (*_rc_config, &RCConfiguration::get_waveform_shape),
1377 sigc::mem_fun (*_rc_config, &RCConfiguration::set_waveform_shape)
1380 wfsh->add (Traditional, _("traditional"));
1381 wfsh->add (Rectified, _("rectified"));
1383 add_option (_("Editor"), wfsh);
1385 add_option (_("Editor"),
1387 "show-waveforms-while-recording",
1388 _("Show waveforms for audio while it is being recorded"),
1389 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_waveforms_while_recording),
1390 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms_while_recording)
1393 add_option (_("Editor"),
1396 _("Show zoom toolbar"),
1397 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_zoom_tools),
1398 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_zoom_tools)
1401 add_option (_("Editor"),
1403 "update-editor-during-summary-drag",
1404 _("Update editor window during drags of the summary"),
1405 sigc::mem_fun (*_rc_config, &RCConfiguration::get_update_editor_during_summary_drag),
1406 sigc::mem_fun (*_rc_config, &RCConfiguration::set_update_editor_during_summary_drag)
1409 add_option (_("Editor"),
1411 "link-editor-and-mixer-selection",
1412 _("Synchronise editor and mixer selection"),
1413 sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_editor_and_mixer_selection),
1414 sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_editor_and_mixer_selection)
1417 bo = new BoolOption (
1419 _("Name new markers"),
1420 sigc::mem_fun (*_rc_config, &RCConfiguration::get_name_new_markers),
1421 sigc::mem_fun (*_rc_config, &RCConfiguration::set_name_new_markers)
1424 add_option (_("Editor"), bo);
1425 Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("If enabled, popup a dialog when a new marker is created to allow its name to be set as it is created."
1426 "\n\nYou can always rename markers by right-clicking on them"));
1428 add_option (_("Editor"),
1430 "autoscroll-editor",
1431 _("Auto-scroll editor window when dragging near its edges"),
1432 sigc::mem_fun (*_rc_config, &RCConfiguration::get_autoscroll_editor),
1433 sigc::mem_fun (*_rc_config, &RCConfiguration::set_autoscroll_editor)
1438 add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
1440 add_option (_("Audio"), new BufferingOptions (_rc_config));
1442 add_option (_("Audio"), new OptionEditorHeading (_("Monitoring")));
1444 ComboOption<MonitorModel>* mm = new ComboOption<MonitorModel> (
1446 _("Record monitoring handled by"),
1447 sigc::mem_fun (*_rc_config, &RCConfiguration::get_monitoring_model),
1448 sigc::mem_fun (*_rc_config, &RCConfiguration::set_monitoring_model)
1451 if (AudioEngine::instance()->port_engine().can_monitor_input()) {
1452 mm->add (HardwareMonitoring, _("via Audio Driver"));
1455 mm->add (SoftwareMonitoring, _("ardour"));
1456 mm->add (ExternalMonitoring, _("audio hardware"));
1458 add_option (_("Audio"), mm);
1460 add_option (_("Audio"),
1462 "tape-machine-mode",
1463 _("Tape machine mode"),
1464 sigc::mem_fun (*_rc_config, &RCConfiguration::get_tape_machine_mode),
1465 sigc::mem_fun (*_rc_config, &RCConfiguration::set_tape_machine_mode)
1468 add_option (_("Audio"), new OptionEditorHeading (_("Connection of tracks and busses")));
1470 add_option (_("Audio"),
1472 "auto-connect-standard-busses",
1473 _("Auto-connect master/monitor busses"),
1474 sigc::mem_fun (*_rc_config, &RCConfiguration::get_auto_connect_standard_busses),
1475 sigc::mem_fun (*_rc_config, &RCConfiguration::set_auto_connect_standard_busses)
1478 ComboOption<AutoConnectOption>* iac = new ComboOption<AutoConnectOption> (
1479 "input-auto-connect",
1480 _("Connect track inputs"),
1481 sigc::mem_fun (*_rc_config, &RCConfiguration::get_input_auto_connect),
1482 sigc::mem_fun (*_rc_config, &RCConfiguration::set_input_auto_connect)
1485 iac->add (AutoConnectPhysical, _("automatically to physical inputs"));
1486 iac->add (ManualConnect, _("manually"));
1488 add_option (_("Audio"), iac);
1490 ComboOption<AutoConnectOption>* oac = new ComboOption<AutoConnectOption> (
1491 "output-auto-connect",
1492 _("Connect track and bus outputs"),
1493 sigc::mem_fun (*_rc_config, &RCConfiguration::get_output_auto_connect),
1494 sigc::mem_fun (*_rc_config, &RCConfiguration::set_output_auto_connect)
1497 oac->add (AutoConnectPhysical, _("automatically to physical outputs"));
1498 oac->add (AutoConnectMaster, _("automatically to master bus"));
1499 oac->add (ManualConnect, _("manually"));
1501 add_option (_("Audio"), oac);
1503 add_option (_("Audio"), new OptionEditorHeading (_("Denormals")));
1505 add_option (_("Audio"),
1507 "denormal-protection",
1508 _("Use DC bias to protect against denormals"),
1509 sigc::mem_fun (*_rc_config, &RCConfiguration::get_denormal_protection),
1510 sigc::mem_fun (*_rc_config, &RCConfiguration::set_denormal_protection)
1513 ComboOption<DenormalModel>* dm = new ComboOption<DenormalModel> (
1515 _("Processor handling"),
1516 sigc::mem_fun (*_rc_config, &RCConfiguration::get_denormal_model),
1517 sigc::mem_fun (*_rc_config, &RCConfiguration::set_denormal_model)
1520 dm->add (DenormalNone, _("no processor handling"));
1524 if (fpu.has_flush_to_zero()) {
1525 dm->add (DenormalFTZ, _("use FlushToZero"));
1528 if (fpu.has_denormals_are_zero()) {
1529 dm->add (DenormalDAZ, _("use DenormalsAreZero"));
1532 if (fpu.has_flush_to_zero() && fpu.has_denormals_are_zero()) {
1533 dm->add (DenormalFTZDAZ, _("use FlushToZero and DenormalsAreZero"));
1536 add_option (_("Audio"), dm);
1538 add_option (_("Audio"), new OptionEditorHeading (_("Plugins")));
1540 add_option (_("Audio"),
1542 "plugins-stop-with-transport",
1543 _("Silence plugins when the transport is stopped"),
1544 sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugins_stop_with_transport),
1545 sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugins_stop_with_transport)
1548 add_option (_("Audio"),
1550 "new-plugins-active",
1551 _("Make new plugins active"),
1552 sigc::mem_fun (*_rc_config, &RCConfiguration::get_new_plugins_active),
1553 sigc::mem_fun (*_rc_config, &RCConfiguration::set_new_plugins_active)
1556 add_option (_("Audio"),
1558 "auto-analyse-audio",
1559 _("Enable automatic analysis of audio"),
1560 sigc::mem_fun (*_rc_config, &RCConfiguration::get_auto_analyse_audio),
1561 sigc::mem_fun (*_rc_config, &RCConfiguration::set_auto_analyse_audio)
1564 add_option (_("Audio"),
1566 "replicate-missing-region-channels",
1567 _("Replicate missing region channels"),
1568 sigc::mem_fun (*_rc_config, &RCConfiguration::get_replicate_missing_region_channels),
1569 sigc::mem_fun (*_rc_config, &RCConfiguration::set_replicate_missing_region_channels)
1574 add_option (_("Solo / mute"),
1577 _("Solo-in-place mute cut (dB)"),
1578 sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_gain),
1579 sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_gain)
1582 _solo_control_is_listen_control = new BoolOption (
1583 "solo-control-is-listen-control",
1584 _("Solo controls are Listen controls"),
1585 sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control),
1586 sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control)
1589 add_option (_("Solo / mute"), _solo_control_is_listen_control);
1591 _listen_position = new ComboOption<ListenPosition> (
1593 _("Listen Position"),
1594 sigc::mem_fun (*_rc_config, &RCConfiguration::get_listen_position),
1595 sigc::mem_fun (*_rc_config, &RCConfiguration::set_listen_position)
1598 _listen_position->add (AfterFaderListen, _("after-fader (AFL)"));
1599 _listen_position->add (PreFaderListen, _("pre-fader (PFL)"));
1601 add_option (_("Solo / mute"), _listen_position);
1603 ComboOption<PFLPosition>* pp = new ComboOption<PFLPosition> (
1605 _("PFL signals come from"),
1606 sigc::mem_fun (*_rc_config, &RCConfiguration::get_pfl_position),
1607 sigc::mem_fun (*_rc_config, &RCConfiguration::set_pfl_position)
1610 pp->add (PFLFromBeforeProcessors, _("before pre-fader processors"));
1611 pp->add (PFLFromAfterProcessors, _("pre-fader but after pre-fader processors"));
1613 add_option (_("Solo / mute"), pp);
1615 ComboOption<AFLPosition>* pa = new ComboOption<AFLPosition> (
1617 _("AFL signals come from"),
1618 sigc::mem_fun (*_rc_config, &RCConfiguration::get_afl_position),
1619 sigc::mem_fun (*_rc_config, &RCConfiguration::set_afl_position)
1622 pa->add (AFLFromBeforeProcessors, _("immediately post-fader"));
1623 pa->add (AFLFromAfterProcessors, _("after post-fader processors (before pan)"));
1625 add_option (_("Solo / mute"), pa);
1627 parameter_changed ("use-monitor-bus");
1629 add_option (_("Solo / mute"),
1632 _("Exclusive solo"),
1633 sigc::mem_fun (*_rc_config, &RCConfiguration::get_exclusive_solo),
1634 sigc::mem_fun (*_rc_config, &RCConfiguration::set_exclusive_solo)
1637 add_option (_("Solo / mute"),
1640 _("Show solo muting"),
1641 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_solo_mutes),
1642 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_solo_mutes)
1645 add_option (_("Solo / mute"),
1647 "solo-mute-override",
1648 _("Soloing overrides muting"),
1649 sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_override),
1650 sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_override)
1653 add_option (_("Solo / mute"), new OptionEditorHeading (_("Default track / bus muting options")));
1655 add_option (_("Solo / mute"),
1657 "mute-affects-pre-fader",
1658 _("Mute affects pre-fader sends"),
1659 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_pre_fader),
1660 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_pre_fader)
1663 add_option (_("Solo / mute"),
1665 "mute-affects-post-fader",
1666 _("Mute affects post-fader sends"),
1667 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_post_fader),
1668 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_post_fader)
1671 add_option (_("Solo / mute"),
1673 "mute-affects-control-outs",
1674 _("Mute affects control outputs"),
1675 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_control_outs),
1676 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_control_outs)
1679 add_option (_("Solo / mute"),
1681 "mute-affects-main-outs",
1682 _("Mute affects main outputs"),
1683 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_main_outs),
1684 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_main_outs)
1687 add_option (_("MIDI"),
1690 _("Send MIDI Clock"),
1691 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_midi_clock),
1692 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_midi_clock)
1695 add_option (_("MIDI"),
1698 _("Send MIDI Time Code"),
1699 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_mtc),
1700 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mtc)
1703 add_option (_("MIDI"),
1704 new SpinOption<int> (
1705 "mtc-qf-speed-tolerance",
1706 _("Percentage either side of normal transport speed to transmit MTC"),
1707 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mtc_qf_speed_tolerance),
1708 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mtc_qf_speed_tolerance),
1712 add_option (_("MIDI"),
1715 _("Obey MIDI Machine Control commands"),
1716 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mmc_control),
1717 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_control)
1720 add_option (_("MIDI"),
1723 _("Send MIDI Machine Control commands"),
1724 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_mmc),
1725 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mmc)
1728 add_option (_("MIDI"),
1731 _("Send MIDI control feedback"),
1732 sigc::mem_fun (*_rc_config, &RCConfiguration::get_midi_feedback),
1733 sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_feedback)
1736 add_option (_("MIDI"),
1737 new SpinOption<uint8_t> (
1738 "mmc-receive-device-id",
1739 _("Inbound MMC device ID"),
1740 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mmc_receive_device_id),
1741 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_receive_device_id),
1745 add_option (_("MIDI"),
1746 new SpinOption<uint8_t> (
1747 "mmc-send-device-id",
1748 _("Outbound MMC device ID"),
1749 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mmc_send_device_id),
1750 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_send_device_id),
1754 add_option (_("MIDI"),
1755 new SpinOption<int32_t> (
1756 "initial-program-change",
1757 _("Initial program change"),
1758 sigc::mem_fun (*_rc_config, &RCConfiguration::get_initial_program_change),
1759 sigc::mem_fun (*_rc_config, &RCConfiguration::set_initial_program_change),
1763 add_option (_("MIDI"),
1765 "diplay-first-midi-bank-as-zero",
1766 _("Display first MIDI bank/program as 0"),
1767 sigc::mem_fun (*_rc_config, &RCConfiguration::get_first_midi_bank_is_zero),
1768 sigc::mem_fun (*_rc_config, &RCConfiguration::set_first_midi_bank_is_zero)
1771 add_option (_("MIDI"),
1773 "never-display-periodic-midi",
1774 _("Never display periodic MIDI messages (MTC, MIDI Clock)"),
1775 sigc::mem_fun (*_rc_config, &RCConfiguration::get_never_display_periodic_midi),
1776 sigc::mem_fun (*_rc_config, &RCConfiguration::set_never_display_periodic_midi)
1779 add_option (_("MIDI"),
1782 _("Sound MIDI notes as they are selected"),
1783 sigc::mem_fun (*_rc_config, &RCConfiguration::get_sound_midi_notes),
1784 sigc::mem_fun (*_rc_config, &RCConfiguration::set_sound_midi_notes)
1787 /* USER INTERACTION */
1789 if (getenv ("ARDOUR_BUNDLED")) {
1790 add_option (_("User interaction"),
1792 "enable-translation",
1793 string_compose (_("Use translations of %1 messages\n"
1794 " <i>(requires a restart of %1 to take effect)</i>\n"
1795 " <i>(if available for your language preferences)</i>"), PROGRAM_NAME),
1796 sigc::ptr_fun (ARDOUR::translations_are_enabled),
1797 sigc::ptr_fun (ARDOUR::set_translations_enabled)));
1800 add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
1802 add_option (_("User interaction"), new KeyboardOptions);
1804 /* Control Surfaces */
1806 add_option (_("Control Surfaces"), new ControlSurfacesOptions (*this));
1808 ComboOption<RemoteModel>* rm = new ComboOption<RemoteModel> (
1810 _("Control surface remote ID"),
1811 sigc::mem_fun (*_rc_config, &RCConfiguration::get_remote_model),
1812 sigc::mem_fun (*_rc_config, &RCConfiguration::set_remote_model)
1815 rm->add (UserOrdered, _("assigned by user"));
1816 rm->add (MixerOrdered, _("follows order of mixer"));
1818 add_option (_("Control Surfaces"), rm);
1820 /* VIDEO Timeline */
1821 add_option (_("Video"), new VideoTimelineOptions (_rc_config));
1825 add_option (S_("Preferences|GUI"),
1828 _("Graphically indicate mouse pointer hovering over various widgets"),
1829 sigc::mem_fun (*_rc_config, &RCConfiguration::get_widget_prelight),
1830 sigc::mem_fun (*_rc_config, &RCConfiguration::set_widget_prelight)
1833 add_option (S_("Preferences|GUI"),
1836 _("Show tooltips if mouse hovers over a control"),
1837 sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_tooltips),
1838 sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_tooltips)
1842 /* font scaling does nothing with GDK/Quartz */
1843 add_option (S_("Preferences|GUI"), new FontScalingOptions (_rc_config));
1846 add_option (S_("GUI"),
1848 "super-rapid-clock-update",
1849 _("update transport clock display every 40ms instead of every 100ms"),
1850 sigc::mem_fun (*_rc_config, &RCConfiguration::get_super_rapid_clock_update),
1851 sigc::mem_fun (*_rc_config, &RCConfiguration::set_super_rapid_clock_update)
1854 /* The names of these controls must be the same as those given in MixerStrip
1855 for the actual widgets being controlled.
1857 _mixer_strip_visibility.add (0, X_("PhaseInvert"), _("Phase Invert"));
1858 _mixer_strip_visibility.add (0, X_("SoloSafe"), _("Solo Safe"));
1859 _mixer_strip_visibility.add (0, X_("SoloIsolated"), _("Solo Isolated"));
1860 _mixer_strip_visibility.add (0, X_("Comments"), _("Comments"));
1861 _mixer_strip_visibility.add (0, X_("MeterPoint"), _("Meter Point"));
1864 S_("Preferences|GUI"),
1865 new VisibilityOption (
1867 &_mixer_strip_visibility,
1868 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mixer_strip_visibility),
1869 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mixer_strip_visibility)
1873 add_option (S_("Preferences|GUI"),
1875 "default-narrow_ms",
1876 _("Use narrow strips in the mixer by default"),
1877 sigc::mem_fun (*_rc_config, &RCConfiguration::get_default_narrow_ms),
1878 sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_narrow_ms)
1881 add_option (S_("Preferences|GUI"), new OptionEditorHeading (_("Metering")));
1883 ComboOption<float>* mht = new ComboOption<float> (
1885 _("Peak hold time"),
1886 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_hold),
1887 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_hold)
1890 mht->add (MeterHoldOff, _("off"));
1891 mht->add (MeterHoldShort, _("short"));
1892 mht->add (MeterHoldMedium, _("medium"));
1893 mht->add (MeterHoldLong, _("long"));
1895 add_option (S_("Preferences|GUI"), mht);
1897 ComboOption<float>* mfo = new ComboOption<float> (
1900 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_falloff),
1901 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_falloff)
1904 mfo->add (METER_FALLOFF_OFF, _("off"));
1905 mfo->add (METER_FALLOFF_SLOWEST, _("slowest [6.6dB/sec]"));
1906 mfo->add (METER_FALLOFF_SLOW, _("slow [8.6dB/sec] (BBC PPM, EBU PPM)"));
1907 mfo->add (METER_FALLOFF_SLOWISH, _("slowish [12.0dB/sec] (DIN)"));
1908 mfo->add (METER_FALLOFF_MODERATE, _("moderate [13.3dB/sec] (EBU Digi PPM, IRT Digi PPM)"));
1909 mfo->add (METER_FALLOFF_MEDIUM, _("medium [20dB/sec]"));
1910 mfo->add (METER_FALLOFF_FAST, _("fast [32dB/sec]"));
1911 mfo->add (METER_FALLOFF_FASTER, _("faster [46dB/sec]"));
1912 mfo->add (METER_FALLOFF_FASTEST, _("fastest [70dB/sec]"));
1914 add_option (S_("Preferences|GUI"), mfo);
1916 ComboOption<MeterLineUp>* mlu = new ComboOption<MeterLineUp> (
1917 "meter-line-up-level",
1918 _("Meter line-up level; 0dBu"),
1919 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_line_up_level),
1920 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_line_up_level)
1923 mlu->add (MeteringLineUp24, _("-24dBFS (SMPTE US: 4dBu = -20dBFS)"));
1924 mlu->add (MeteringLineUp20, _("-20dBFS (SMPTE RP.0155)"));
1925 mlu->add (MeteringLineUp18, _("-18dBFS (EBU, BBC)"));
1926 mlu->add (MeteringLineUp15, _("-15dBFS (DIN)"));
1928 Gtkmm2ext::UI::instance()->set_tip (mlu->tip_widget(), _("Configure meter-marks and color-knee point for dBFS scale DPM, set reference level for IEC1/Nordic, IEC2 PPM and VU meter."));
1930 add_option (S_("Preferences|GUI"), mlu);
1932 ComboOption<MeterLineUp>* mld = new ComboOption<MeterLineUp> (
1933 "meter-line-up-din",
1934 _("IEC1/DIN Meter line-up level; 0dBu"),
1935 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_line_up_din),
1936 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_line_up_din)
1939 mld->add (MeteringLineUp24, _("-24dBFS (SMPTE US: 4dBu = -20dBFS)"));
1940 mld->add (MeteringLineUp20, _("-20dBFS (SMPTE RP.0155)"));
1941 mld->add (MeteringLineUp18, _("-18dBFS (EBU, BBC)"));
1942 mld->add (MeteringLineUp15, _("-15dBFS (DIN)"));
1944 Gtkmm2ext::UI::instance()->set_tip (mld->tip_widget(), _("Reference level for IEC1/DIN meter."));
1946 add_option (S_("Preferences|GUI"), mld);
1948 ComboOption<VUMeterStandard>* mvu = new ComboOption<VUMeterStandard> (
1949 "meter-vu-standard",
1950 _("VU Meter standard"),
1951 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_vu_standard),
1952 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_vu_standard)
1955 mvu->add (MeteringVUfrench, _("0VU = -2dBu (France)"));
1956 mvu->add (MeteringVUamerican, _("0VU = 0dBu (North America, Australia)"));
1957 mvu->add (MeteringVUstandard, _("0VU = +4dBu (standard)"));
1958 mvu->add (MeteringVUeight, _("0VU = +8dBu"));
1960 add_option (S_("Preferences|GUI"), mvu);
1962 Gtk::Adjustment *mpk = manage (new Gtk::Adjustment(0, -10, 0, .1, .1));
1963 HSliderOption *mpks = new HSliderOption("meter-peak",
1964 _("Peak threshold [dBFS]"),
1966 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_peak),
1967 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_peak)
1970 Gtkmm2ext::UI::instance()->set_tip
1971 (mpks->tip_widget(),
1972 _("Specify the audio signal level in dbFS at and above which the meter-peak indicator will flash red."));
1974 add_option (S_("Preferences|GUI"), mpks);
1976 add_option (S_("Preferences|GUI"),
1979 _("LED meter style"),
1980 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_style_led),
1981 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_style_led)
1987 RCOptionEditor::parameter_changed (string const & p)
1989 OptionEditor::parameter_changed (p);
1991 if (p == "use-monitor-bus") {
1992 bool const s = Config->get_use_monitor_bus ();
1994 /* we can't use this if we don't have a monitor bus */
1995 Config->set_solo_control_is_listen_control (false);
1997 _solo_control_is_listen_control->set_sensitive (s);
1998 _listen_position->set_sensitive (s);
1999 } else if (p == "sync-source") {
2000 _sync_source->set_sensitive (true);
2002 _sync_source->set_sensitive (!_session->config.get_external_sync());
2004 switch(Config->get_sync_source()) {
2007 _sync_genlock->set_sensitive (true);
2008 _sync_framerate->set_sensitive (true);
2009 _sync_source_2997->set_sensitive (true);
2012 _sync_genlock->set_sensitive (false);
2013 _sync_framerate->set_sensitive (false);
2014 _sync_source_2997->set_sensitive (false);
2017 } else if (p == "send-ltc") {
2018 bool const s = Config->get_send_ltc ();
2019 _ltc_send_continuously->set_sensitive (s);
2020 _ltc_volume_slider->set_sensitive (s);
2024 void RCOptionEditor::ltc_generator_volume_changed () {
2025 _rc_config->set_ltc_output_volume (pow(10, _ltc_volume_adjustment->get_value() / 20));
2029 RCOptionEditor::populate_sync_options ()
2031 vector<SyncSource> sync_opts = ARDOUR::get_available_sync_options ();
2033 _sync_source->clear ();
2035 for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) {
2036 _sync_source->add (*i, sync_source_to_string (*i));