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 #if !defined USE_CAIRO_IMAGE_SURFACE && !defined NDEBUG
25 #define OPTIONAL_CAIRO_IMAGE_SURFACE
28 #include <cairo/cairo.h>
30 #include <boost/algorithm/string.hpp>
32 #include <gtkmm/liststore.h>
33 #include <gtkmm/stock.h>
34 #include <gtkmm/scale.h>
36 #include <gtkmm2ext/utils.h>
37 #include <gtkmm2ext/slider_controller.h>
38 #include <gtkmm2ext/gtk_ui.h>
39 #include <gtkmm2ext/paths_dialog.h>
44 #include "ardour/audioengine.h"
45 #include "ardour/dB.h"
46 #include "ardour/rc_configuration.h"
47 #include "ardour/control_protocol_manager.h"
48 #include "ardour/plugin_manager.h"
49 #include "control_protocol/control_protocol.h"
51 #include "canvas/wave_view.h"
53 #include "ardour_window.h"
54 #include "ardour_dialog.h"
55 #include "gui_thread.h"
56 #include "meter_patterns.h"
57 #include "midi_tracer.h"
58 #include "rc_option_editor.h"
60 #include "midi_port_dialog.h"
63 #include "theme_manager.h"
64 #include "ui_config.h"
69 using namespace Gtkmm2ext;
71 using namespace ARDOUR;
72 using namespace ARDOUR_UI_UTILS;
74 class ClickOptions : public OptionEditorBox
77 ClickOptions (RCConfiguration* c, Gtk::Window* p)
79 , _click_browse_button (_("Browse..."))
80 , _click_emphasis_browse_button (_("Browse..."))
82 Table* t = manage (new Table (4, 3));
85 Label* l = manage (left_aligned_label (_("Use default Click:")));
86 t->attach (*l, 0, 1, 0, 1, FILL);
87 t->attach (_use_default_click_check_button, 1, 2, 0, 1, FILL);
88 _use_default_click_check_button.signal_toggled().connect (
89 sigc::mem_fun (*this, &ClickOptions::use_default_click_toggled));
91 l = manage (left_aligned_label (_("Emphasis on first beat:")));
92 t->attach (*l, 0, 1, 1, 2, FILL);
93 t->attach (_use_emphasis_on_click_check_button, 1, 2, 1, 2, FILL);
94 _use_emphasis_on_click_check_button.signal_toggled().connect (
95 sigc::mem_fun (*this, &ClickOptions::use_emphasis_on_click_toggled));
97 l = manage (left_aligned_label (_("Click audio file:")));
98 t->attach (*l, 0, 1, 2, 3, FILL);
99 t->attach (_click_path_entry, 1, 2, 2, 3, FILL);
100 _click_browse_button.signal_clicked ().connect (
101 sigc::mem_fun (*this, &ClickOptions::click_browse_clicked));
102 t->attach (_click_browse_button, 2, 3, 2, 3, FILL);
104 l = manage (left_aligned_label (_("Click emphasis audio file:")));
105 t->attach (*l, 0, 1, 3, 4, FILL);
106 t->attach (_click_emphasis_path_entry, 1, 2, 3, 4, FILL);
107 _click_emphasis_browse_button.signal_clicked ().connect (
108 sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked));
109 t->attach (_click_emphasis_browse_button, 2, 3, 3, 4, FILL);
111 _box->pack_start (*t, false, false);
113 _click_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_changed));
114 _click_emphasis_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_changed));
116 if (_rc_config->get_click_sound ().empty() &&
117 _rc_config->get_click_emphasis_sound().empty()) {
118 _use_default_click_check_button.set_active (true);
119 _use_emphasis_on_click_check_button.set_active (true);
122 _use_default_click_check_button.set_active (false);
123 _use_emphasis_on_click_check_button.set_active (false);
127 void parameter_changed (string const & p)
129 if (p == "click-sound") {
130 _click_path_entry.set_text (_rc_config->get_click_sound());
131 } else if (p == "click-emphasis-sound") {
132 _click_emphasis_path_entry.set_text (_rc_config->get_click_emphasis_sound());
133 } else if (p == "use-click-emphasis") {
134 bool x = _rc_config->get_use_click_emphasis ();
135 _use_emphasis_on_click_check_button.set_active (x);
139 void set_state_from_config ()
141 parameter_changed ("click-sound");
142 parameter_changed ("click-emphasis-sound");
143 parameter_changed ("use-click-emphasis");
148 void click_browse_clicked ()
150 SoundFileChooser sfdb (_("Choose Click"));
155 if (sfdb.run () == RESPONSE_OK) {
156 click_chosen (sfdb.get_filename());
160 void click_chosen (string const & path)
162 _click_path_entry.set_text (path);
163 _rc_config->set_click_sound (path);
166 void click_changed ()
168 click_chosen (_click_path_entry.get_text ());
171 void click_emphasis_browse_clicked ()
173 SoundFileChooser sfdb (_("Choose Click Emphasis"));
178 if (sfdb.run () == RESPONSE_OK) {
179 click_emphasis_chosen (sfdb.get_filename());
183 void click_emphasis_chosen (string const & path)
185 _click_emphasis_path_entry.set_text (path);
186 _rc_config->set_click_emphasis_sound (path);
189 void click_emphasis_changed ()
191 click_emphasis_chosen (_click_emphasis_path_entry.get_text ());
194 void use_default_click_toggled ()
196 if (_use_default_click_check_button.get_active ()) {
197 _rc_config->set_click_sound ("");
198 _rc_config->set_click_emphasis_sound ("");
199 _click_path_entry.set_sensitive (false);
200 _click_emphasis_path_entry.set_sensitive (false);
201 _click_browse_button.set_sensitive (false);
202 _click_emphasis_browse_button.set_sensitive (false);
204 _click_path_entry.set_sensitive (true);
205 _click_emphasis_path_entry.set_sensitive (true);
206 _click_browse_button.set_sensitive (true);
207 _click_emphasis_browse_button.set_sensitive (true);
211 void use_emphasis_on_click_toggled ()
213 if (_use_emphasis_on_click_check_button.get_active ()) {
214 _rc_config->set_use_click_emphasis(true);
216 _rc_config->set_use_click_emphasis(false);
220 RCConfiguration* _rc_config;
221 CheckButton _use_default_click_check_button;
222 CheckButton _use_emphasis_on_click_check_button;
223 Entry _click_path_entry;
224 Entry _click_emphasis_path_entry;
225 Button _click_browse_button;
226 Button _click_emphasis_browse_button;
229 class UndoOptions : public OptionEditorBox
232 UndoOptions (RCConfiguration* c) :
234 _limit_undo_button (_("Limit undo history to")),
235 _save_undo_button (_("Save undo history of"))
237 Table* t = new Table (2, 3);
240 t->attach (_limit_undo_button, 0, 1, 0, 1, FILL);
241 _limit_undo_spin.set_range (0, 512);
242 _limit_undo_spin.set_increments (1, 10);
243 t->attach (_limit_undo_spin, 1, 2, 0, 1, FILL | EXPAND);
244 Label* l = manage (left_aligned_label (_("commands")));
245 t->attach (*l, 2, 3, 0, 1);
247 t->attach (_save_undo_button, 0, 1, 1, 2, FILL);
248 _save_undo_spin.set_range (0, 512);
249 _save_undo_spin.set_increments (1, 10);
250 t->attach (_save_undo_spin, 1, 2, 1, 2, FILL | EXPAND);
251 l = manage (left_aligned_label (_("commands")));
252 t->attach (*l, 2, 3, 1, 2);
254 _box->pack_start (*t);
256 _limit_undo_button.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_toggled));
257 _limit_undo_spin.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_changed));
258 _save_undo_button.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_toggled));
259 _save_undo_spin.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_changed));
262 void parameter_changed (string const & p)
264 if (p == "history-depth") {
265 int32_t const d = _rc_config->get_history_depth();
266 _limit_undo_button.set_active (d != 0);
267 _limit_undo_spin.set_sensitive (d != 0);
268 _limit_undo_spin.set_value (d);
269 } else if (p == "save-history") {
270 bool const x = _rc_config->get_save_history ();
271 _save_undo_button.set_active (x);
272 _save_undo_spin.set_sensitive (x);
273 } else if (p == "save-history-depth") {
274 _save_undo_spin.set_value (_rc_config->get_saved_history_depth());
278 void set_state_from_config ()
280 parameter_changed ("save-history");
281 parameter_changed ("history-depth");
282 parameter_changed ("save-history-depth");
285 void limit_undo_toggled ()
287 bool const x = _limit_undo_button.get_active ();
288 _limit_undo_spin.set_sensitive (x);
289 int32_t const n = x ? 16 : 0;
290 _limit_undo_spin.set_value (n);
291 _rc_config->set_history_depth (n);
294 void limit_undo_changed ()
296 _rc_config->set_history_depth (_limit_undo_spin.get_value_as_int ());
299 void save_undo_toggled ()
301 bool const x = _save_undo_button.get_active ();
302 _rc_config->set_save_history (x);
305 void save_undo_changed ()
307 _rc_config->set_saved_history_depth (_save_undo_spin.get_value_as_int ());
311 RCConfiguration* _rc_config;
312 CheckButton _limit_undo_button;
313 SpinButton _limit_undo_spin;
314 CheckButton _save_undo_button;
315 SpinButton _save_undo_spin;
320 static const struct {
332 { "Key|Shift", GDK_SHIFT_MASK },
333 { "Command", GDK_MOD2_MASK },
334 { "Control", GDK_CONTROL_MASK },
335 { "Option", GDK_MOD1_MASK },
336 { "Command-Shift", GDK_MOD2_MASK|GDK_SHIFT_MASK },
337 { "Command-Option", GDK_MOD2_MASK|GDK_MOD1_MASK },
338 { "Command-Option-Control", GDK_MOD2_MASK|GDK_MOD1_MASK|GDK_CONTROL_MASK },
339 { "Option-Control", GDK_MOD1_MASK|GDK_CONTROL_MASK },
340 { "Option-Shift", GDK_MOD1_MASK|GDK_SHIFT_MASK },
341 { "Control-Shift", GDK_CONTROL_MASK|GDK_SHIFT_MASK },
342 { "Shift-Command-Option", GDK_MOD5_MASK|GDK_SHIFT_MASK|GDK_MOD2_MASK },
345 { "Key|Shift", GDK_SHIFT_MASK },
346 { "Control", GDK_CONTROL_MASK },
347 { "Alt", GDK_MOD1_MASK },
348 { "Control-Shift", GDK_CONTROL_MASK|GDK_SHIFT_MASK },
349 { "Control-Alt", GDK_CONTROL_MASK|GDK_MOD1_MASK },
350 { "Control-Shift-Alt", GDK_CONTROL_MASK|GDK_SHIFT_MASK|GDK_MOD1_MASK },
351 { "Alt-Windows", GDK_MOD1_MASK|GDK_MOD4_MASK },
352 { "Alt-Shift", GDK_MOD1_MASK|GDK_SHIFT_MASK },
353 { "Alt-Shift-Windows", GDK_MOD1_MASK|GDK_SHIFT_MASK|GDK_MOD4_MASK },
354 { "Mod2", GDK_MOD2_MASK },
355 { "Mod3", GDK_MOD3_MASK },
356 { "Windows", GDK_MOD4_MASK },
357 { "Mod5", GDK_MOD5_MASK },
363 class KeyboardOptions : public OptionEditorBox
367 _delete_button_adjustment (3, 1, 12),
368 _delete_button_spin (_delete_button_adjustment),
369 _edit_button_adjustment (3, 1, 5),
370 _edit_button_spin (_edit_button_adjustment),
371 _insert_note_button_adjustment (3, 1, 5),
372 _insert_note_button_spin (_insert_note_button_adjustment)
374 const Glib::ustring restart_msg = _("\nChanges to this setting will only persist after your project has been saved.");
375 /* internationalize and prepare for use with combos */
378 for (int i = 0; modifiers[i].name; ++i) {
379 dumb.push_back (S_(modifiers[i].name));
382 set_popdown_strings (_edit_modifier_combo, dumb);
383 _edit_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_modifier_chosen));
384 Gtkmm2ext::UI::instance()->set_tip (_edit_modifier_combo,
385 (string_compose (_("<b>Recommended Setting: %1 + button 3 (right mouse button)</b>%2"), Keyboard::primary_modifier_name (), restart_msg)));
386 for (int x = 0; modifiers[x].name; ++x) {
387 if (modifiers[x].modifier == Keyboard::edit_modifier ()) {
388 _edit_modifier_combo.set_active_text (S_(modifiers[x].name));
393 Table* t = manage (new Table (5, 11));
399 Label* l = manage (left_aligned_label (_("Select Keyboard layout:")));
400 l->set_name ("OptionsLabel");
404 for (map<string,string>::iterator bf = Keyboard::binding_files.begin(); bf != Keyboard::binding_files.end(); ++bf) {
405 strs.push_back (bf->first);
408 set_popdown_strings (_keyboard_layout_selector, strs);
409 _keyboard_layout_selector.set_active_text (Keyboard::current_binding_name());
410 _keyboard_layout_selector.signal_changed().connect (sigc::mem_fun (*this, &KeyboardOptions::bindings_changed));
412 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
413 t->attach (_keyboard_layout_selector, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
418 l = manage (left_aligned_label (_("When Clicking:")));
419 l->set_name ("OptionEditorHeading");
420 t->attach (*l, col, col + 2, row, row + 1, FILL | EXPAND, FILL);
425 l = manage (left_aligned_label (_("Edit using:")));
426 l->set_name ("OptionsLabel");
428 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
429 t->attach (_edit_modifier_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
431 l = manage (new Label (_("+ button")));
432 l->set_name ("OptionsLabel");
434 t->attach (*l, col + 3, col + 4, row, row + 1, FILL | EXPAND, FILL);
435 t->attach (_edit_button_spin, col + 4, col + 5, row, row + 1, FILL | EXPAND, FILL);
437 _edit_button_spin.set_name ("OptionsEntry");
438 _edit_button_adjustment.set_value (Keyboard::edit_button());
439 _edit_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_button_changed));
444 set_popdown_strings (_delete_modifier_combo, dumb);
445 _delete_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_modifier_chosen));
446 Gtkmm2ext::UI::instance()->set_tip (_delete_modifier_combo,
447 (string_compose (_("<b>Recommended Setting: %1 + button 3 (right mouse button)</b>%2"), Keyboard::tertiary_modifier_name (), restart_msg)));
448 for (int x = 0; modifiers[x].name; ++x) {
449 if (modifiers[x].modifier == Keyboard::delete_modifier ()) {
450 _delete_modifier_combo.set_active_text (S_(modifiers[x].name));
455 l = manage (left_aligned_label (_("Delete using:")));
456 l->set_name ("OptionsLabel");
458 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
459 t->attach (_delete_modifier_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
461 l = manage (new Label (_("+ button")));
462 l->set_name ("OptionsLabel");
464 t->attach (*l, col + 3, col + 4, row, row + 1, FILL | EXPAND, FILL);
465 t->attach (_delete_button_spin, col + 4, col + 5, row, row + 1, FILL | EXPAND, FILL);
467 _delete_button_spin.set_name ("OptionsEntry");
468 _delete_button_adjustment.set_value (Keyboard::delete_button());
469 _delete_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed));
474 set_popdown_strings (_insert_note_modifier_combo, dumb);
475 _insert_note_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen));
476 Gtkmm2ext::UI::instance()->set_tip (_insert_note_modifier_combo,
477 (string_compose (_("<b>Recommended Setting: %1 + button 1 (left mouse button)</b>%2"), Keyboard::primary_modifier_name (), restart_msg)));
478 for (int x = 0; modifiers[x].name; ++x) {
479 if (modifiers[x].modifier == Keyboard::insert_note_modifier ()) {
480 _insert_note_modifier_combo.set_active_text (S_(modifiers[x].name));
485 l = manage (left_aligned_label (_("Insert note using:")));
486 l->set_name ("OptionsLabel");
488 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
489 t->attach (_insert_note_modifier_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
491 l = manage (new Label (_("+ button")));
492 l->set_name ("OptionsLabel");
494 t->attach (*l, col + 3, col + 4, row, row + 1, FILL | EXPAND, FILL);
495 t->attach (_insert_note_button_spin, col + 4, col + 5, row, row + 1, FILL | EXPAND, FILL);
497 _insert_note_button_spin.set_name ("OptionsEntry");
498 _insert_note_button_adjustment.set_value (Keyboard::insert_note_button());
499 _insert_note_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed));
503 l = manage (left_aligned_label (_("When Beginning a Drag:")));
504 l->set_name ("OptionEditorHeading");
505 t->attach (*l, 0, 2, row, row + 1, FILL | EXPAND, FILL);
511 set_popdown_strings (_copy_modifier_combo, dumb);
512 _copy_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::copy_modifier_chosen));
513 Gtkmm2ext::UI::instance()->set_tip (_copy_modifier_combo,
514 (string_compose (_("<b>Recommended Setting: %1</b>%2"),
516 Keyboard::secondary_modifier_name (),
518 Keyboard::primary_modifier_name (),
521 for (int x = 0; modifiers[x].name; ++x) {
522 if (modifiers[x].modifier == (guint) Keyboard::CopyModifier) {
523 _copy_modifier_combo.set_active_text (S_(modifiers[x].name));
528 l = manage (left_aligned_label (_("Copy items using:")));
529 l->set_name ("OptionsLabel");
531 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
532 t->attach (_copy_modifier_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
537 /* constraint modifier */
538 set_popdown_strings (_constraint_modifier_combo, dumb);
539 _constraint_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::constraint_modifier_chosen));
540 Gtkmm2ext::UI::instance()->set_tip (_constraint_modifier_combo,
541 (string_compose (_("<b>Recommended Setting: %1</b>%2"),
543 Keyboard::primary_modifier_name (),
545 Keyboard::secondary_modifier_name (),
548 for (int x = 0; modifiers[x].name; ++x) {
549 if (modifiers[x].modifier == (guint) ArdourKeyboard::constraint_modifier ()) {
550 _constraint_modifier_combo.set_active_text (S_(modifiers[x].name));
555 l = manage (left_aligned_label (_("Constrain drag using:")));
556 l->set_name ("OptionsLabel");
558 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
559 t->attach (_constraint_modifier_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
563 l = manage (left_aligned_label (_("When Beginning a Trim:")));
564 l->set_name ("OptionEditorHeading");
565 t->attach (*l, 0, 2, row, row + 1, FILL | EXPAND, FILL);
571 set_popdown_strings (_trim_contents_combo, dumb);
572 _trim_contents_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::trim_contents_modifier_chosen));
573 Gtkmm2ext::UI::instance()->set_tip (_trim_contents_combo,
574 (string_compose (_("<b>Recommended Setting: %1</b>%2"), Keyboard::primary_modifier_name (), restart_msg)));
575 for (int x = 0; modifiers[x].name; ++x) {
576 if (modifiers[x].modifier == (guint) ArdourKeyboard::trim_contents_modifier ()) {
577 _trim_contents_combo.set_active_text (S_(modifiers[x].name));
582 l = manage (left_aligned_label (_("Trim contents using:")));
583 l->set_name ("OptionsLabel");
585 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
586 t->attach (_trim_contents_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
592 set_popdown_strings (_trim_anchored_combo, dumb);
593 _trim_anchored_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::trim_anchored_modifier_chosen));
594 Gtkmm2ext::UI::instance()->set_tip (_trim_anchored_combo,
595 (string_compose (_("<b>Recommended Setting: %1</b>%2"), Keyboard::tertiary_modifier_name (), restart_msg)));
596 for (int x = 0; modifiers[x].name; ++x) {
597 if (modifiers[x].modifier == (guint) ArdourKeyboard::trim_anchored_modifier ()) {
598 _trim_anchored_combo.set_active_text (S_(modifiers[x].name));
603 l = manage (left_aligned_label (_("Anchored trim using:")));
604 l->set_name ("OptionsLabel");
606 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
608 t->attach (_trim_anchored_combo, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
613 /* jump trim disabled for now
614 set_popdown_strings (_trim_jump_combo, dumb);
615 _trim_jump_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::trim_jump_modifier_chosen));
617 for (int x = 0; modifiers[x].name; ++x) {
618 if (modifiers[x].modifier == (guint) Keyboard::trim_jump_modifier ()) {
619 _trim_jump_combo.set_active_text (S_(modifiers[x].name));
624 l = manage (left_aligned_label (_("Jump after trim using:")));
625 l->set_name ("OptionsLabel");
627 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
629 t->attach (_trim_jump_combo, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
635 /* note resize relative */
636 set_popdown_strings (_note_size_relative_combo, dumb);
637 _note_size_relative_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::note_size_relative_modifier_chosen));
638 Gtkmm2ext::UI::instance()->set_tip (_note_size_relative_combo,
639 (string_compose (_("<b>Recommended Setting: %1</b>%2"), Keyboard::primary_modifier_name (), restart_msg)));
640 for (int x = 0; modifiers[x].name; ++x) {
641 if (modifiers[x].modifier == (guint) ArdourKeyboard::note_size_relative_modifier ()) {
642 _note_size_relative_combo.set_active_text (S_(modifiers[x].name));
647 l = manage (left_aligned_label (_("Resize notes relatively using:")));
648 l->set_name ("OptionsLabel");
650 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
652 t->attach (_note_size_relative_combo, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
656 l = manage (left_aligned_label (_("While Dragging:")));
657 l->set_name ("OptionEditorHeading");
658 t->attach (*l, 0, 2, row, row + 1, FILL | EXPAND, FILL);
664 set_popdown_strings (_snap_modifier_combo, dumb);
665 _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen));
667 Glib::ustring mod_str = string_compose (X_("%1-%2"), Keyboard::level4_modifier_name (), Keyboard::tertiary_modifier_name ());
669 Glib::ustring mod_str = Keyboard::secondary_modifier_name();
671 Gtkmm2ext::UI::instance()->set_tip (_snap_modifier_combo,
672 (string_compose (_("<b>Recommended Setting: %1</b>%2"), mod_str, restart_msg)));
673 for (int x = 0; modifiers[x].name; ++x) {
674 if (modifiers[x].modifier == (guint) Keyboard::snap_modifier ()) {
675 _snap_modifier_combo.set_active_text (S_(modifiers[x].name));
680 l = manage (left_aligned_label (_("Ignore snap using:")));
681 l->set_name ("OptionsLabel");
683 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
684 t->attach (_snap_modifier_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
690 set_popdown_strings (_snap_delta_combo, dumb);
691 _snap_delta_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_delta_modifier_chosen));
693 mod_str = Keyboard::level4_modifier_name ();
695 mod_str = string_compose (X_("%1-%2"), Keyboard::secondary_modifier_name (), Keyboard::level4_modifier_name ());
697 Gtkmm2ext::UI::instance()->set_tip (_snap_delta_combo,
698 (string_compose (_("<b>Recommended Setting: %1</b>%2"), mod_str, restart_msg)));
699 for (int x = 0; modifiers[x].name; ++x) {
700 if (modifiers[x].modifier == (guint) Keyboard::snap_delta_modifier ()) {
701 _snap_delta_combo.set_active_text (S_(modifiers[x].name));
706 l = manage (left_aligned_label (_("Snap relatively using:")));
707 l->set_name ("OptionsLabel");
709 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
710 t->attach (_snap_delta_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
714 l = manage (left_aligned_label (_("While Trimming:")));
715 l->set_name ("OptionEditorHeading");
716 t->attach (*l, 0, 2, row, row + 1, FILL | EXPAND, FILL);
722 set_popdown_strings (_trim_overlap_combo, dumb);
723 _trim_overlap_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::trim_overlap_modifier_chosen));
725 Gtkmm2ext::UI::instance()->set_tip (_trim_overlap_combo,
726 (string_compose (_("<b>Recommended Setting: %1</b>%2"), Keyboard::tertiary_modifier_name (), restart_msg)));
727 for (int x = 0; modifiers[x].name; ++x) {
728 if (modifiers[x].modifier == (guint) ArdourKeyboard::trim_overlap_modifier ()) {
729 _trim_overlap_combo.set_active_text (S_(modifiers[x].name));
734 l = manage (left_aligned_label (_("Resize overlapped regions using:")));
735 l->set_name ("OptionsLabel");
737 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
738 t->attach (_trim_overlap_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
742 l = manage (left_aligned_label (_("While Dragging Control Points:")));
743 l->set_name ("OptionEditorHeading");
744 t->attach (*l, 0, 2, row, row + 1, FILL | EXPAND, FILL);
750 set_popdown_strings (_fine_adjust_combo, dumb);
751 _fine_adjust_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::fine_adjust_modifier_chosen));
753 mod_str = string_compose (X_("%1-%2"), Keyboard::secondary_modifier_name (), Keyboard::tertiary_modifier_name ());
754 Gtkmm2ext::UI::instance()->set_tip (_fine_adjust_combo,
755 (string_compose (_("<b>Recommended Setting: %1</b>%2"), mod_str, restart_msg)));
756 for (int x = 0; modifiers[x].name; ++x) {
757 if (modifiers[x].modifier == (guint) ArdourKeyboard::fine_adjust_modifier ()) {
758 _fine_adjust_combo.set_active_text (S_(modifiers[x].name));
763 l = manage (left_aligned_label (_("Fine adjust using:")));
764 l->set_name ("OptionsLabel");
766 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
767 t->attach (_fine_adjust_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
773 set_popdown_strings (_push_points_combo, dumb);
774 _push_points_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::push_points_modifier_chosen));
776 Gtkmm2ext::UI::instance()->set_tip (_push_points_combo,
777 (string_compose (_("<b>Recommended Setting: %1</b>%2"), Keyboard::primary_modifier_name (), restart_msg)));
778 for (int x = 0; modifiers[x].name; ++x) {
779 if (modifiers[x].modifier == (guint) ArdourKeyboard::push_points_modifier ()) {
780 _push_points_combo.set_active_text (S_(modifiers[x].name));
785 l = manage (left_aligned_label (_("Push points using:")));
786 l->set_name ("OptionsLabel");
788 t->attach (*l, col, col + 1, row, row + 1, FILL | EXPAND, FILL);
789 t->attach (_push_points_combo, col + 1, col + 2, row, row + 1, FILL | EXPAND, FILL);
791 _box->pack_start (*t, false, false);
794 void parameter_changed (string const &)
796 /* XXX: these aren't really config options... */
799 void set_state_from_config ()
801 /* XXX: these aren't really config options... */
806 void bindings_changed ()
808 string const txt = _keyboard_layout_selector.get_active_text();
810 /* XXX: config...? for all this keyboard stuff */
812 for (map<string,string>::iterator i = Keyboard::binding_files.begin(); i != Keyboard::binding_files.end(); ++i) {
813 if (txt == i->first) {
814 if (Keyboard::load_keybindings (i->second)) {
815 Keyboard::save_keybindings ();
821 void edit_modifier_chosen ()
823 string const txt = _edit_modifier_combo.get_active_text();
825 for (int i = 0; modifiers[i].name; ++i) {
826 if (txt == _(modifiers[i].name)) {
827 Keyboard::set_edit_modifier (modifiers[i].modifier);
833 void delete_modifier_chosen ()
835 string const txt = _delete_modifier_combo.get_active_text();
837 for (int i = 0; modifiers[i].name; ++i) {
838 if (txt == _(modifiers[i].name)) {
839 Keyboard::set_delete_modifier (modifiers[i].modifier);
845 void copy_modifier_chosen ()
847 string const txt = _copy_modifier_combo.get_active_text();
849 for (int i = 0; modifiers[i].name; ++i) {
850 if (txt == _(modifiers[i].name)) {
851 Keyboard::set_copy_modifier (modifiers[i].modifier);
857 void insert_note_modifier_chosen ()
859 string const txt = _insert_note_modifier_combo.get_active_text();
861 for (int i = 0; modifiers[i].name; ++i) {
862 if (txt == _(modifiers[i].name)) {
863 Keyboard::set_insert_note_modifier (modifiers[i].modifier);
869 void snap_modifier_chosen ()
871 string const txt = _snap_modifier_combo.get_active_text();
873 for (int i = 0; modifiers[i].name; ++i) {
874 if (txt == _(modifiers[i].name)) {
875 Keyboard::set_snap_modifier (modifiers[i].modifier);
881 void snap_delta_modifier_chosen ()
883 string const txt = _snap_delta_combo.get_active_text();
885 for (int i = 0; modifiers[i].name; ++i) {
886 if (txt == _(modifiers[i].name)) {
887 Keyboard::set_snap_delta_modifier (modifiers[i].modifier);
893 void constraint_modifier_chosen ()
895 string const txt = _constraint_modifier_combo.get_active_text();
897 for (int i = 0; modifiers[i].name; ++i) {
898 if (txt == _(modifiers[i].name)) {
899 ArdourKeyboard::set_constraint_modifier (modifiers[i].modifier);
905 void trim_contents_modifier_chosen ()
907 string const txt = _trim_contents_combo.get_active_text();
909 for (int i = 0; modifiers[i].name; ++i) {
910 if (txt == _(modifiers[i].name)) {
911 ArdourKeyboard::set_trim_contents_modifier (modifiers[i].modifier);
917 void trim_overlap_modifier_chosen ()
919 string const txt = _trim_overlap_combo.get_active_text();
921 for (int i = 0; modifiers[i].name; ++i) {
922 if (txt == _(modifiers[i].name)) {
923 ArdourKeyboard::set_trim_overlap_modifier (modifiers[i].modifier);
929 void trim_anchored_modifier_chosen ()
931 string const txt = _trim_anchored_combo.get_active_text();
933 for (int i = 0; modifiers[i].name; ++i) {
934 if (txt == _(modifiers[i].name)) {
935 ArdourKeyboard::set_trim_anchored_modifier (modifiers[i].modifier);
941 void fine_adjust_modifier_chosen ()
943 string const txt = _fine_adjust_combo.get_active_text();
945 for (int i = 0; modifiers[i].name; ++i) {
946 if (txt == _(modifiers[i].name)) {
947 ArdourKeyboard::set_fine_adjust_modifier (modifiers[i].modifier);
953 void push_points_modifier_chosen ()
955 string const txt = _push_points_combo.get_active_text();
957 for (int i = 0; modifiers[i].name; ++i) {
958 if (txt == _(modifiers[i].name)) {
959 ArdourKeyboard::set_push_points_modifier (modifiers[i].modifier);
965 void note_size_relative_modifier_chosen ()
967 string const txt = _note_size_relative_combo.get_active_text();
969 for (int i = 0; modifiers[i].name; ++i) {
970 if (txt == _(modifiers[i].name)) {
971 ArdourKeyboard::set_note_size_relative_modifier (modifiers[i].modifier);
977 void delete_button_changed ()
979 Keyboard::set_delete_button (_delete_button_spin.get_value_as_int());
982 void edit_button_changed ()
984 Keyboard::set_edit_button (_edit_button_spin.get_value_as_int());
987 void insert_note_button_changed ()
989 Keyboard::set_insert_note_button (_insert_note_button_spin.get_value_as_int());
992 ComboBoxText _keyboard_layout_selector;
993 ComboBoxText _edit_modifier_combo;
994 ComboBoxText _delete_modifier_combo;
995 ComboBoxText _copy_modifier_combo;
996 ComboBoxText _insert_note_modifier_combo;
997 ComboBoxText _snap_modifier_combo;
998 ComboBoxText _snap_delta_combo;
999 ComboBoxText _constraint_modifier_combo;
1000 ComboBoxText _trim_contents_combo;
1001 ComboBoxText _trim_overlap_combo;
1002 ComboBoxText _trim_anchored_combo;
1003 ComboBoxText _trim_jump_combo;
1004 ComboBoxText _fine_adjust_combo;
1005 ComboBoxText _push_points_combo;
1006 ComboBoxText _note_size_relative_combo;
1007 Adjustment _delete_button_adjustment;
1008 SpinButton _delete_button_spin;
1009 Adjustment _edit_button_adjustment;
1010 SpinButton _edit_button_spin;
1011 Adjustment _insert_note_button_adjustment;
1012 SpinButton _insert_note_button_spin;
1016 class FontScalingOptions : public OptionEditorBox
1019 FontScalingOptions () :
1020 _dpi_adjustment (100, 50, 250, 1, 5),
1021 _dpi_slider (_dpi_adjustment)
1023 _dpi_adjustment.set_value (UIConfiguration::instance().get_font_scale() / 1024.);
1025 Label* l = manage (new Label (_("GUI and Font scaling:")));
1026 l->set_name ("OptionsLabel");
1028 const Glib::ustring dflt = _("Default");
1029 const Glib::ustring empty = X_(""); // despite gtk-doc saying so, NULL does not work as reference
1031 _dpi_slider.set_name("FontScaleSlider");
1032 _dpi_slider.set_update_policy (UPDATE_DISCONTINUOUS);
1033 _dpi_slider.set_draw_value(false);
1034 _dpi_slider.add_mark(50, Gtk::POS_TOP, empty);
1035 _dpi_slider.add_mark(60, Gtk::POS_TOP, empty);
1036 _dpi_slider.add_mark(70, Gtk::POS_TOP, empty);
1037 _dpi_slider.add_mark(80, Gtk::POS_TOP, empty);
1038 _dpi_slider.add_mark(90, Gtk::POS_TOP, empty);
1039 _dpi_slider.add_mark(100, Gtk::POS_TOP, dflt);
1040 _dpi_slider.add_mark(125, Gtk::POS_TOP, empty);
1041 _dpi_slider.add_mark(150, Gtk::POS_TOP, empty);
1042 _dpi_slider.add_mark(175, Gtk::POS_TOP, empty);
1043 _dpi_slider.add_mark(200, Gtk::POS_TOP, empty);
1044 _dpi_slider.add_mark(225, Gtk::POS_TOP, empty);
1045 _dpi_slider.add_mark(250, Gtk::POS_TOP, empty);
1047 HBox* h = manage (new HBox);
1049 h->pack_start (*l, false, false);
1050 h->pack_start (_dpi_slider, true, true);
1052 _box->pack_start (*h, false, false);
1054 set_note (_("Adjusting the scale require an application restart to re-layout."));
1056 _dpi_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &FontScalingOptions::dpi_changed));
1059 void parameter_changed (string const & p)
1061 if (p == "font-scale") {
1062 _dpi_adjustment.set_value (UIConfiguration::instance().get_font_scale() / 1024.);
1066 void set_state_from_config ()
1068 parameter_changed ("font-scale");
1075 UIConfiguration::instance().set_font_scale ((long) floor (_dpi_adjustment.get_value() * 1024.));
1076 /* XXX: should be triggered from the parameter changed signal */
1077 UIConfiguration::instance().reset_dpi ();
1080 Adjustment _dpi_adjustment;
1084 class ClipLevelOptions : public OptionEditorBox
1088 : _clip_level_adjustment (-.5, -50.0, 0.0, 0.1, 1.0) /* units of dB */
1089 , _clip_level_slider (_clip_level_adjustment)
1091 _clip_level_adjustment.set_value (UIConfiguration::instance().get_waveform_clip_level ());
1093 Label* l = manage (new Label (_("Waveform Clip Level (dBFS):")));
1094 l->set_name ("OptionsLabel");
1096 _clip_level_slider.set_update_policy (UPDATE_DISCONTINUOUS);
1097 HBox* h = manage (new HBox);
1099 h->pack_start (*l, false, false);
1100 h->pack_start (_clip_level_slider, true, true);
1102 _box->pack_start (*h, false, false);
1104 _clip_level_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &ClipLevelOptions::clip_level_changed));
1107 void parameter_changed (string const & p)
1109 if (p == "waveform-clip-level") {
1110 _clip_level_adjustment.set_value (UIConfiguration::instance().get_waveform_clip_level());
1114 void set_state_from_config ()
1116 parameter_changed ("waveform-clip-level");
1121 void clip_level_changed ()
1123 UIConfiguration::instance().set_waveform_clip_level (_clip_level_adjustment.get_value());
1124 /* XXX: should be triggered from the parameter changed signal */
1125 ArdourCanvas::WaveView::set_clip_level (_clip_level_adjustment.get_value());
1128 Adjustment _clip_level_adjustment;
1129 HScale _clip_level_slider;
1132 class BufferingOptions : public OptionEditorBox
1135 BufferingOptions (RCConfiguration* c)
1137 , _playback_adjustment (5, 1, 60, 1, 4)
1138 , _capture_adjustment (5, 1, 60, 1, 4)
1139 , _playback_slider (_playback_adjustment)
1140 , _capture_slider (_capture_adjustment)
1142 vector<string> presets;
1144 /* these must match the order of the enums for BufferingPreset */
1146 presets.push_back (_("Small sessions (4-16 tracks)"));
1147 presets.push_back (_("Medium sessions (16-64 tracks)"));
1148 presets.push_back (_("Large sessions (64+ tracks)"));
1149 presets.push_back (_("Custom (set by sliders below)"));
1151 set_popdown_strings (_buffering_presets_combo, presets);
1153 Label* l = manage (new Label (_("Preset:")));
1154 l->set_name ("OptionsLabel");
1155 HBox* h = manage (new HBox);
1156 h->set_spacing (12);
1157 h->pack_start (*l, false, false);
1158 h->pack_start (_buffering_presets_combo, true, true);
1159 _box->pack_start (*h, false, false);
1161 _buffering_presets_combo.signal_changed().connect (sigc::mem_fun (*this, &BufferingOptions::preset_changed));
1163 _playback_adjustment.set_value (_rc_config->get_audio_playback_buffer_seconds());
1165 l = manage (new Label (_("Playback (seconds of buffering):")));
1166 l->set_name ("OptionsLabel");
1168 _playback_slider.set_update_policy (UPDATE_DISCONTINUOUS);
1169 h = manage (new HBox);
1171 h->pack_start (*l, false, false);
1172 h->pack_start (_playback_slider, true, true);
1174 _box->pack_start (*h, false, false);
1176 _capture_adjustment.set_value (_rc_config->get_audio_capture_buffer_seconds());
1178 l = manage (new Label (_("Recording (seconds of buffering):")));
1179 l->set_name ("OptionsLabel");
1181 _capture_slider.set_update_policy (UPDATE_DISCONTINUOUS);
1182 h = manage (new HBox);
1184 h->pack_start (*l, false, false);
1185 h->pack_start (_capture_slider, true, true);
1187 _box->pack_start (*h, false, false);
1189 _capture_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::capture_changed));
1190 _playback_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::playback_changed));
1193 void parameter_changed (string const & p)
1195 if (p == "buffering-preset") {
1196 switch (_rc_config->get_buffering_preset()) {
1198 _playback_slider.set_sensitive (false);
1199 _capture_slider.set_sensitive (false);
1200 _buffering_presets_combo.set_active (0);
1203 _playback_slider.set_sensitive (false);
1204 _capture_slider.set_sensitive (false);
1205 _buffering_presets_combo.set_active (1);
1208 _playback_slider.set_sensitive (false);
1209 _capture_slider.set_sensitive (false);
1210 _buffering_presets_combo.set_active (2);
1213 _playback_slider.set_sensitive (true);
1214 _capture_slider.set_sensitive (true);
1215 _buffering_presets_combo.set_active (3);
1220 if (p == "playback-buffer-seconds") {
1221 _playback_adjustment.set_value (_rc_config->get_audio_playback_buffer_seconds());
1222 } else if (p == "capture-buffer-seconds") {
1223 _capture_adjustment.set_value (_rc_config->get_audio_capture_buffer_seconds());
1227 void set_state_from_config ()
1229 parameter_changed ("buffering-preset");
1230 parameter_changed ("playback-buffer-seconds");
1231 parameter_changed ("capture-buffer-seconds");
1236 void preset_changed ()
1238 int index = _buffering_presets_combo.get_active_row_number ();
1244 _rc_config->set_buffering_preset (Small);
1247 _rc_config->set_buffering_preset (Medium);
1250 _rc_config->set_buffering_preset (Large);
1253 _rc_config->set_buffering_preset (Custom);
1256 error << string_compose (_("programming error: unknown buffering preset string, index = %1"), index) << endmsg;
1261 void playback_changed ()
1263 _rc_config->set_audio_playback_buffer_seconds ((long) _playback_adjustment.get_value());
1266 void capture_changed ()
1268 _rc_config->set_audio_capture_buffer_seconds ((long) _capture_adjustment.get_value());
1271 RCConfiguration* _rc_config;
1272 Adjustment _playback_adjustment;
1273 Adjustment _capture_adjustment;
1274 HScale _playback_slider;
1275 HScale _capture_slider;
1276 ComboBoxText _buffering_presets_combo;
1279 class ControlSurfacesOptions : public OptionEditorBox
1282 ControlSurfacesOptions (Gtk::Window& parent)
1284 , _ignore_view_change (0)
1286 _store = ListStore::create (_model);
1287 _view.set_model (_store);
1288 _view.append_column (_("Control Surface Protocol"), _model.name);
1289 _view.get_column(0)->set_resizable (true);
1290 _view.get_column(0)->set_expand (true);
1291 _view.append_column_editable (_("Enabled"), _model.enabled);
1292 _view.append_column_editable (_("Feedback"), _model.feedback);
1294 _box->pack_start (_view, false, false);
1296 Label* label = manage (new Label);
1297 label->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
1299 _box->pack_start (*label, false, false);
1302 ControlProtocolManager& m = ControlProtocolManager::instance ();
1303 m.ProtocolStatusChange.connect (protocol_status_connection, MISSING_INVALIDATOR,
1304 boost::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context());
1306 _store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::view_changed));
1307 _view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked));
1310 void parameter_changed (std::string const &)
1315 void set_state_from_config ()
1319 ControlProtocolManager& m = ControlProtocolManager::instance ();
1320 for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
1322 if (!(*i)->mandatory) {
1323 TreeModel::Row r = *_store->append ();
1324 r[_model.name] = (*i)->name;
1325 r[_model.enabled] = ((*i)->protocol || (*i)->requested);
1326 r[_model.feedback] = ((*i)->protocol && (*i)->protocol->get_feedback ());
1327 r[_model.protocol_info] = *i;
1334 void protocol_status_changed (ControlProtocolInfo* cpi) {
1336 TreeModel::Children rows = _store->children();
1338 for (TreeModel::Children::iterator x = rows.begin(); x != rows.end(); ++x) {
1339 string n = ((*x)[_model.name]);
1341 if ((*x)[_model.protocol_info] == cpi) {
1342 _ignore_view_change++;
1343 (*x)[_model.enabled] = (cpi->protocol || cpi->requested);
1344 _ignore_view_change--;
1350 void view_changed (TreeModel::Path const &, TreeModel::iterator const & i)
1352 TreeModel::Row r = *i;
1354 if (_ignore_view_change) {
1358 ControlProtocolInfo* cpi = r[_model.protocol_info];
1363 bool const was_enabled = (cpi->protocol != 0);
1364 bool const is_enabled = r[_model.enabled];
1367 if (was_enabled != is_enabled) {
1370 ControlProtocolManager::instance().activate (*cpi);
1372 ControlProtocolManager::instance().deactivate (*cpi);
1376 bool const was_feedback = (cpi->protocol && cpi->protocol->get_feedback ());
1377 bool const is_feedback = r[_model.feedback];
1379 if (was_feedback != is_feedback && cpi->protocol) {
1380 cpi->protocol->set_feedback (is_feedback);
1384 void edit_clicked (GdkEventButton* ev)
1386 if (ev->type != GDK_2BUTTON_PRESS) {
1391 ControlProtocolInfo* cpi;
1394 row = *(_view.get_selection()->get_selected());
1395 if (!row[_model.enabled]) {
1398 cpi = row[_model.protocol_info];
1399 if (!cpi || !cpi->protocol || !cpi->protocol->has_editor ()) {
1402 Box* box = (Box*) cpi->protocol->get_gui ();
1406 if (box->get_parent()) {
1407 static_cast<ArdourWindow*>(box->get_parent())->present();
1410 string title = row[_model.name];
1411 /* once created, the window is managed by the surface itself (as ->get_parent())
1412 * Surface's tear_down_gui() is called on session close, when de-activating
1413 * or re-initializing a surface.
1414 * tear_down_gui() hides an deletes the Window if it exists.
1416 ArdourWindow* win = new ArdourWindow (_parent, title);
1417 win->set_title ("Control Protocol Options");
1423 class ControlSurfacesModelColumns : public TreeModelColumnRecord
1427 ControlSurfacesModelColumns ()
1432 add (protocol_info);
1435 TreeModelColumn<string> name;
1436 TreeModelColumn<bool> enabled;
1437 TreeModelColumn<bool> feedback;
1438 TreeModelColumn<ControlProtocolInfo*> protocol_info;
1441 Glib::RefPtr<ListStore> _store;
1442 ControlSurfacesModelColumns _model;
1444 Gtk::Window& _parent;
1445 PBD::ScopedConnection protocol_status_connection;
1446 uint32_t _ignore_view_change;
1449 class VideoTimelineOptions : public OptionEditorBox
1452 VideoTimelineOptions (RCConfiguration* c)
1454 , _show_video_export_info_button (_("Show Video Export Info before export"))
1455 , _show_video_server_dialog_button (_("Show Video Server Startup Dialog"))
1456 , _video_advanced_setup_button (_("Advanced Setup (remote video server)"))
1458 Table* t = manage (new Table (2, 6));
1459 t->set_spacings (4);
1461 t->attach (_video_advanced_setup_button, 0, 2, 0, 1);
1462 _video_advanced_setup_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::video_advanced_setup_toggled));
1463 Gtkmm2ext::UI::instance()->set_tip (_video_advanced_setup_button,
1464 _("<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."));
1466 Label* l = manage (new Label (_("Video Server URL:")));
1467 l->set_alignment (0, 0.5);
1468 t->attach (*l, 0, 1, 1, 2, FILL);
1469 t->attach (_video_server_url_entry, 1, 2, 1, 2, FILL);
1470 Gtkmm2ext::UI::instance()->set_tip (_video_server_url_entry,
1471 _("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"));
1473 l = manage (new Label (_("Video Folder:")));
1474 l->set_alignment (0, 0.5);
1475 t->attach (*l, 0, 1, 2, 3, FILL);
1476 t->attach (_video_server_docroot_entry, 1, 2, 2, 3);
1477 Gtkmm2ext::UI::instance()->set_tip (_video_server_docroot_entry,
1478 _("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."));
1480 /* small vspace y=3..4 */
1482 t->attach (_show_video_export_info_button, 0, 2, 4, 5);
1483 _show_video_export_info_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_export_info_toggled));
1484 Gtkmm2ext::UI::instance()->set_tip (_show_video_export_info_button,
1485 _("<b>When enabled</b> an information window with details is displayed before the video-export dialog."));
1487 t->attach (_show_video_server_dialog_button, 0, 2, 5, 6);
1488 _show_video_server_dialog_button.signal_toggled().connect (sigc::mem_fun (*this, &VideoTimelineOptions::show_video_server_dialog_toggled));
1489 Gtkmm2ext::UI::instance()->set_tip (_show_video_server_dialog_button,
1490 _("<b>When enabled</b> the video server is never launched automatically without confirmation"));
1492 _video_server_url_entry.signal_changed().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_url_changed));
1493 _video_server_url_entry.signal_activate().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_url_changed));
1494 _video_server_docroot_entry.signal_changed().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_docroot_changed));
1495 _video_server_docroot_entry.signal_activate().connect (sigc::mem_fun(*this, &VideoTimelineOptions::server_docroot_changed));
1497 _box->pack_start (*t,true,true);
1500 void server_url_changed ()
1502 _rc_config->set_video_server_url (_video_server_url_entry.get_text());
1505 void server_docroot_changed ()
1507 _rc_config->set_video_server_docroot (_video_server_docroot_entry.get_text());
1510 void show_video_export_info_toggled ()
1512 bool const x = _show_video_export_info_button.get_active ();
1513 _rc_config->set_show_video_export_info (x);
1516 void show_video_server_dialog_toggled ()
1518 bool const x = _show_video_server_dialog_button.get_active ();
1519 _rc_config->set_show_video_server_dialog (x);
1522 void video_advanced_setup_toggled ()
1524 bool const x = _video_advanced_setup_button.get_active ();
1525 _rc_config->set_video_advanced_setup(x);
1528 void parameter_changed (string const & p)
1530 if (p == "video-server-url") {
1531 _video_server_url_entry.set_text (_rc_config->get_video_server_url());
1532 } else if (p == "video-server-docroot") {
1533 _video_server_docroot_entry.set_text (_rc_config->get_video_server_docroot());
1534 } else if (p == "show-video-export-info") {
1535 bool const x = _rc_config->get_show_video_export_info();
1536 _show_video_export_info_button.set_active (x);
1537 } else if (p == "show-video-server-dialog") {
1538 bool const x = _rc_config->get_show_video_server_dialog();
1539 _show_video_server_dialog_button.set_active (x);
1540 } else if (p == "video-advanced-setup") {
1541 bool const x = _rc_config->get_video_advanced_setup();
1542 _video_advanced_setup_button.set_active(x);
1543 _video_server_docroot_entry.set_sensitive(x);
1544 _video_server_url_entry.set_sensitive(x);
1548 void set_state_from_config ()
1550 parameter_changed ("video-server-url");
1551 parameter_changed ("video-server-docroot");
1552 parameter_changed ("video-monitor-setup-dialog");
1553 parameter_changed ("show-video-export-info");
1554 parameter_changed ("show-video-server-dialog");
1555 parameter_changed ("video-advanced-setup");
1559 RCConfiguration* _rc_config;
1560 Entry _video_server_url_entry;
1561 Entry _video_server_docroot_entry;
1562 CheckButton _show_video_export_info_button;
1563 CheckButton _show_video_server_dialog_button;
1564 CheckButton _video_advanced_setup_button;
1567 class PluginOptions : public OptionEditorBox
1570 PluginOptions (RCConfiguration* c)
1572 , _display_plugin_scan_progress (_("Always Display Plugin Scan Progress"))
1573 , _discover_vst_on_start (_("Scan for [new] VST Plugins on Application Start"))
1574 , _discover_au_on_start (_("Scan for AudioUnit Plugins on Application Start"))
1575 , _verbose_plugin_scan (_("Verbose Plugin Scan"))
1576 , _timeout_adjustment (0, 0, 3000, 50, 50)
1577 , _timeout_slider (_timeout_adjustment)
1580 std::stringstream ss;
1581 Table* t = manage (new Table (2, 6));
1582 t->set_spacings (4);
1586 ss << "<b>" << _("General") << "</b>";
1587 l = manage (left_aligned_label (ss.str()));
1588 l->set_use_markup (true);
1589 t->attach (*manage (new Label ("")), 0, 3, n, n+1, FILL | EXPAND); ++n;
1590 t->attach (*l, 0, 2, n, n+1, FILL | EXPAND); ++n;
1592 b = manage (new Button (_("Scan for Plugins")));
1593 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::refresh_clicked));
1594 t->attach (*b, 0, 2, n, n+1, FILL); ++n;
1596 t->attach (_display_plugin_scan_progress, 0, 2, n, n+1); ++n;
1597 _display_plugin_scan_progress.signal_toggled().connect (sigc::mem_fun (*this, &PluginOptions::display_plugin_scan_progress_toggled));
1598 Gtkmm2ext::UI::instance()->set_tip (_display_plugin_scan_progress,
1599 _("<b>When enabled</b> a popup window showing plugin scan progress is displayed for indexing (cache load) and discovery (detect new plugins)"));
1601 #if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
1602 _timeout_slider.set_digits (0);
1603 _timeout_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &PluginOptions::timeout_changed));
1605 Gtkmm2ext::UI::instance()->set_tip(_timeout_slider,
1606 _("Specify the default timeout for plugin instantiation in 1/10 seconds. Plugins that require more time to load will be blacklisted. A value of 0 disables the timeout."));
1608 l = manage (left_aligned_label (_("Scan Time Out [deciseconds]")));;
1609 HBox* h = manage (new HBox);
1611 h->pack_start (*l, false, false);
1612 h->pack_start (_timeout_slider, true, true);
1613 t->attach (*h, 0, 2, n, n+1); ++n;
1616 ss << "<b>" << _("VST") << "</b>";
1617 l = manage (left_aligned_label (ss.str()));
1618 l->set_use_markup (true);
1619 t->attach (*manage (new Label ("")), 0, 3, n, n+1, FILL | EXPAND); ++n;
1620 t->attach (*l, 0, 2, n, n+1, FILL | EXPAND); ++n;
1622 b = manage (new Button (_("Clear VST Cache")));
1623 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::clear_vst_cache_clicked));
1624 t->attach (*b, 0, 1, n, n+1, FILL);
1626 b = manage (new Button (_("Clear VST Blacklist")));
1627 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::clear_vst_blacklist_clicked));
1628 t->attach (*b, 1, 2, n, n+1, FILL);
1631 t->attach (_discover_vst_on_start, 0, 2, n, n+1); ++n;
1632 _discover_vst_on_start.signal_toggled().connect (sigc::mem_fun (*this, &PluginOptions::discover_vst_on_start_toggled));
1633 Gtkmm2ext::UI::instance()->set_tip (_discover_vst_on_start,
1634 _("<b>When enabled</b> new VST plugins are searched, tested and added to the cache index on application start. When disabled new plugins will only be available after triggering a 'Scan' manually"));
1636 #ifdef LXVST_SUPPORT
1637 t->attach (*manage (right_aligned_label (_("Linux VST Path:"))), 0, 1, n, n+1);
1638 b = manage (new Button (_("Edit")));
1639 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::edit_lxvst_path_clicked));
1640 t->attach (*b, 1, 2, n, n+1, FILL); ++n;
1643 #ifdef WINDOWS_VST_SUPPORT
1644 t->attach (*manage (right_aligned_label (_("Windows VST Path:"))), 0, 1, n, n+1);
1645 b = manage (new Button (_("Edit")));
1646 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::edit_vst_path_clicked));
1647 t->attach (*b, 1, 2, n, n+1, FILL); ++n;
1649 // currently verbose logging is only implemented for Windows VST.
1650 t->attach (_verbose_plugin_scan, 0, 2, n, n+1); ++n;
1651 _verbose_plugin_scan.signal_toggled().connect (sigc::mem_fun (*this, &PluginOptions::verbose_plugin_scan_toggled));
1652 Gtkmm2ext::UI::instance()->set_tip (_verbose_plugin_scan,
1653 _("<b>When enabled</b> additional information for every plugin is added to the Log Window."));
1657 #ifdef AUDIOUNIT_SUPPORT
1659 ss << "<b>" << _("Audio Unit") << "</b>";
1660 l = manage (left_aligned_label (ss.str()));
1661 l->set_use_markup (true);
1662 t->attach (*manage (new Label ("")), 0, 3, n, n+1, FILL | EXPAND); ++n;
1663 t->attach (*l, 0, 2, n, n+1, FILL | EXPAND); ++n;
1665 t->attach (_discover_au_on_start, 0, 2, n, n+1); ++n;
1666 _discover_au_on_start.signal_toggled().connect (sigc::mem_fun (*this, &PluginOptions::discover_au_on_start_toggled));
1667 Gtkmm2ext::UI::instance()->set_tip (_discover_au_on_start,
1668 _("<b>When enabled</b> Audio Unit Plugins are discovered on application start. When disabled AU plugins will only be available after triggering a 'Scan' manually. The first successful scan will enable AU auto-scan, Any crash during plugin discovery will disable it."));
1671 b = manage (new Button (_("Clear AU Cache")));
1672 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::clear_au_cache_clicked));
1673 t->attach (*b, 0, 1, n, n+1, FILL);
1675 b = manage (new Button (_("Clear AU Blacklist")));
1676 b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::clear_au_blacklist_clicked));
1677 t->attach (*b, 1, 2, n, n+1, FILL);
1681 _box->pack_start (*t,true,true);
1684 void parameter_changed (string const & p) {
1685 if (p == "show-plugin-scan-window") {
1686 bool const x = UIConfiguration::instance().get_show_plugin_scan_window();
1687 _display_plugin_scan_progress.set_active (x);
1689 else if (p == "discover-vst-on-start") {
1690 bool const x = _rc_config->get_discover_vst_on_start();
1691 _discover_vst_on_start.set_active (x);
1693 else if (p == "vst-scan-timeout") {
1694 int const x = _rc_config->get_vst_scan_timeout();
1695 _timeout_adjustment.set_value (x);
1697 else if (p == "discover-audio-units") {
1698 bool const x = _rc_config->get_discover_audio_units();
1699 _discover_au_on_start.set_active (x);
1701 else if (p == "verbose-plugin-scan") {
1702 bool const x = _rc_config->get_verbose_plugin_scan();
1703 _verbose_plugin_scan.set_active (x);
1707 void set_state_from_config () {
1708 parameter_changed ("show-plugin-scan-window");
1709 parameter_changed ("discover-vst-on-start");
1710 parameter_changed ("vst-scan-timeout");
1711 parameter_changed ("discover-audio-units");
1712 parameter_changed ("verbose-plugin-scan");
1716 RCConfiguration* _rc_config;
1717 CheckButton _display_plugin_scan_progress;
1718 CheckButton _discover_vst_on_start;
1719 CheckButton _discover_au_on_start;
1720 CheckButton _verbose_plugin_scan;
1721 Adjustment _timeout_adjustment;
1722 HScale _timeout_slider;
1724 void display_plugin_scan_progress_toggled () {
1725 bool const x = _display_plugin_scan_progress.get_active();
1726 UIConfiguration::instance().set_show_plugin_scan_window(x);
1729 void discover_vst_on_start_toggled () {
1730 bool const x = _discover_vst_on_start.get_active();
1731 _rc_config->set_discover_vst_on_start(x);
1734 void discover_au_on_start_toggled () {
1735 bool const x = _discover_au_on_start.get_active();
1736 _rc_config->set_discover_audio_units(x);
1739 void verbose_plugin_scan_toggled () {
1740 bool const x = _verbose_plugin_scan.get_active();
1741 _rc_config->set_verbose_plugin_scan(x);
1744 void timeout_changed () {
1745 int x = floor(_timeout_adjustment.get_value());
1746 _rc_config->set_vst_scan_timeout(x);
1749 void clear_vst_cache_clicked () {
1750 PluginManager::instance().clear_vst_cache();
1753 void clear_vst_blacklist_clicked () {
1754 PluginManager::instance().clear_vst_blacklist();
1757 void clear_au_cache_clicked () {
1758 PluginManager::instance().clear_au_cache();
1761 void clear_au_blacklist_clicked () {
1762 PluginManager::instance().clear_au_blacklist();
1766 void edit_vst_path_clicked () {
1767 Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog (
1768 _("Set Windows VST Search Path"),
1769 _rc_config->get_plugin_path_vst(),
1770 PluginManager::instance().get_default_windows_vst_path()
1772 ResponseType r = (ResponseType) pd->run ();
1774 if (r == RESPONSE_ACCEPT) {
1775 _rc_config->set_plugin_path_vst(pd->get_serialized_paths());
1780 // todo consolidate with edit_vst_path_clicked..
1781 void edit_lxvst_path_clicked () {
1782 Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog (
1783 _("Set Linux VST Search Path"),
1784 _rc_config->get_plugin_path_lxvst(),
1785 PluginManager::instance().get_default_lxvst_path()
1787 ResponseType r = (ResponseType) pd->run ();
1789 if (r == RESPONSE_ACCEPT) {
1790 _rc_config->set_plugin_path_lxvst(pd->get_serialized_paths());
1795 void refresh_clicked () {
1796 PluginManager::instance().refresh();
1801 /** A class which allows control of visibility of some editor components usign
1802 * a VisibilityGroup. The caller should pass in a `dummy' VisibilityGroup
1803 * which has the correct members, but with null widget pointers. This
1804 * class allows the user to set visibility of the members, the details
1805 * of which are stored in a configuration variable which can be watched
1806 * by parts of the editor that actually contain the widgets whose visibility
1807 * is being controlled.
1810 class VisibilityOption : public Option
1813 /** @param name User-visible name for this group.
1814 * @param g `Dummy' VisibilityGroup (as described above).
1815 * @param get Method to get the value of the appropriate configuration variable.
1816 * @param set Method to set the value of the appropriate configuration variable.
1818 VisibilityOption (string name, VisibilityGroup* g, sigc::slot<string> get, sigc::slot<bool, string> set)
1819 : Option (g->get_state_name(), name)
1821 , _visibility_group (g)
1825 /* Watch for changes made by the user to our members */
1826 _visibility_group->VisibilityChanged.connect_same_thread (
1827 _visibility_group_connection, sigc::bind (&VisibilityOption::changed, this)
1831 void set_state_from_config ()
1833 /* Set our state from the current configuration */
1834 _visibility_group->set_state (_get ());
1837 void add_to_page (OptionEditorPage* p)
1839 _heading.add_to_page (p);
1840 add_widget_to_page (p, _visibility_group->list_view ());
1843 Gtk::Widget& tip_widget() { return *_visibility_group->list_view (); }
1848 /* The user has changed something, so reflect this change
1849 in the RCConfiguration.
1851 _set (_visibility_group->get_state_value ());
1854 OptionEditorHeading _heading;
1855 VisibilityGroup* _visibility_group;
1856 sigc::slot<std::string> _get;
1857 sigc::slot<bool, std::string> _set;
1858 PBD::ScopedConnection _visibility_group_connection;
1863 RCOptionEditor::RCOptionEditor ()
1864 : OptionEditor (Config, string_compose (_("%1 Preferences"), PROGRAM_NAME))
1865 , _rc_config (Config)
1866 , _mixer_strip_visibility ("mixer-element-visibility")
1870 uint32_t hwcpus = hardware_concurrency ();
1872 BoolComboOption* bco;
1875 add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization")));
1877 ComboOption<int32_t>* procs = new ComboOption<int32_t> (
1879 _("Signal processing uses"),
1880 sigc::mem_fun (*_rc_config, &RCConfiguration::get_processor_usage),
1881 sigc::mem_fun (*_rc_config, &RCConfiguration::set_processor_usage)
1884 procs->add (-1, _("all but one processor"));
1885 procs->add (0, _("all available processors"));
1887 for (uint32_t i = 1; i <= hwcpus; ++i) {
1888 procs->add (i, string_compose (_("%1 processors"), i));
1891 procs->set_note (string_compose (_("This setting will only take effect when %1 is restarted."), PROGRAM_NAME));
1893 add_option (_("Misc"), procs);
1896 add_option (_("Misc"), new OptionEditorHeading (S_("Options|Undo")));
1898 add_option (_("Misc"), new UndoOptions (_rc_config));
1900 add_option (_("Misc"),
1902 "verify-remove-last-capture",
1903 _("Verify removal of last capture"),
1904 sigc::mem_fun (*_rc_config, &RCConfiguration::get_verify_remove_last_capture),
1905 sigc::mem_fun (*_rc_config, &RCConfiguration::set_verify_remove_last_capture)
1908 add_option (_("Misc"),
1910 "periodic-safety-backups",
1911 _("Make periodic backups of the session file"),
1912 sigc::mem_fun (*_rc_config, &RCConfiguration::get_periodic_safety_backups),
1913 sigc::mem_fun (*_rc_config, &RCConfiguration::set_periodic_safety_backups)
1916 add_option (_("Misc"), new OptionEditorHeading (_("Session Management")));
1918 add_option (_("Misc"),
1920 "only-copy-imported-files",
1921 _("Always copy imported files"),
1922 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_only_copy_imported_files),
1923 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_only_copy_imported_files)
1926 add_option (_("Misc"), new DirectoryOption (
1927 X_("default-session-parent-dir"),
1928 _("Default folder for new sessions:"),
1929 sigc::mem_fun (*_rc_config, &RCConfiguration::get_default_session_parent_dir),
1930 sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_session_parent_dir)
1933 add_option (_("Misc"),
1934 new SpinOption<uint32_t> (
1935 "max-recent-sessions",
1936 _("Maximum number of recent sessions"),
1937 sigc::mem_fun (*_rc_config, &RCConfiguration::get_max_recent_sessions),
1938 sigc::mem_fun (*_rc_config, &RCConfiguration::set_max_recent_sessions),
1942 add_option (_("Misc"), new OptionEditorHeading (_("Click")));
1944 add_option (_("Misc"), new ClickOptions (_rc_config, this));
1946 add_option (_("Misc"),
1949 _("Click gain level"),
1950 sigc::mem_fun (*_rc_config, &RCConfiguration::get_click_gain),
1951 sigc::mem_fun (*_rc_config, &RCConfiguration::set_click_gain)
1954 add_option (_("Misc"), new OptionEditorHeading (_("Automation")));
1956 add_option (_("Misc"),
1957 new SpinOption<double> (
1958 "automation-thinning-factor",
1959 _("Thinning factor (larger value => less data)"),
1960 sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_thinning_factor),
1961 sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_thinning_factor),
1965 add_option (_("Misc"),
1966 new SpinOption<double> (
1967 "automation-interval-msecs",
1968 _("Automation sampling interval (milliseconds)"),
1969 sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_interval_msecs),
1970 sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_interval_msecs),
1976 add_option (_("Transport"), new OptionEditorHeading (S_("Transport Options")));
1980 tsf = new BoolOption (
1981 "latched-record-enable",
1982 _("Keep record-enable engaged on stop"),
1983 sigc::mem_fun (*_rc_config, &RCConfiguration::get_latched_record_enable),
1984 sigc::mem_fun (*_rc_config, &RCConfiguration::set_latched_record_enable)
1986 // Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _(""));
1987 add_option (_("Transport"), tsf);
1989 tsf = new BoolOption (
1991 _("Play loop is a transport mode"),
1992 sigc::mem_fun (*_rc_config, &RCConfiguration::get_loop_is_mode),
1993 sigc::mem_fun (*_rc_config, &RCConfiguration::set_loop_is_mode)
1995 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
1996 (_("<b>When enabled</b> the loop button does not start playback but forces playback to always play the loop\n\n"
1997 "<b>When disabled</b> the loop button starts playing the loop, but stop then cancels loop playback")));
1998 add_option (_("Transport"), tsf);
2000 tsf = new BoolOption (
2001 "stop-recording-on-xrun",
2002 _("Stop recording when an xrun occurs"),
2003 sigc::mem_fun (*_rc_config, &RCConfiguration::get_stop_recording_on_xrun),
2004 sigc::mem_fun (*_rc_config, &RCConfiguration::set_stop_recording_on_xrun)
2006 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
2007 string_compose (_("<b>When enabled</b> %1 will stop recording if an over- or underrun is detected by the audio engine"),
2009 add_option (_("Transport"), tsf);
2011 tsf = new BoolOption (
2012 "create-xrun-marker",
2013 _("Create markers where xruns occur"),
2014 sigc::mem_fun (*_rc_config, &RCConfiguration::get_create_xrun_marker),
2015 sigc::mem_fun (*_rc_config, &RCConfiguration::set_create_xrun_marker)
2017 // Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _(""));
2018 add_option (_("Transport"), tsf);
2020 tsf = new BoolOption (
2021 "stop-at-session-end",
2022 _("Stop at the end of the session"),
2023 sigc::mem_fun (*_rc_config, &RCConfiguration::get_stop_at_session_end),
2024 sigc::mem_fun (*_rc_config, &RCConfiguration::set_stop_at_session_end)
2026 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
2027 string_compose (_("<b>When enabled</b> if %1 is <b>not recording</b>, it will stop the transport "
2028 "when it reaches the current session end marker\n\n"
2029 "<b>When disabled</b> %1 will continue to roll past the session end marker at all times"),
2031 add_option (_("Transport"), tsf);
2033 tsf = new BoolOption (
2035 _("Do seamless looping (not possible when slaved to MTC, LTC etc)"),
2036 sigc::mem_fun (*_rc_config, &RCConfiguration::get_seamless_loop),
2037 sigc::mem_fun (*_rc_config, &RCConfiguration::set_seamless_loop)
2039 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(),
2040 string_compose (_("<b>When enabled</b> this will loop by reading ahead and wrapping around at the loop point, "
2041 "preventing any need to do a transport locate at the end of the loop\n\n"
2042 "<b>When disabled</b> looping is done by locating back to the start of the loop when %1 reaches the end "
2043 "which will often cause a small click or delay"), PROGRAM_NAME));
2044 add_option (_("Transport"), tsf);
2046 tsf = new BoolOption (
2047 "disable-disarm-during-roll",
2048 _("Disable per-track record disarm while rolling"),
2049 sigc::mem_fun (*_rc_config, &RCConfiguration::get_disable_disarm_during_roll),
2050 sigc::mem_fun (*_rc_config, &RCConfiguration::set_disable_disarm_during_roll)
2052 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"));
2053 add_option (_("Transport"), tsf);
2055 tsf = new BoolOption (
2057 _("12dB gain reduction during fast-forward and fast-rewind"),
2058 sigc::mem_fun (*_rc_config, &RCConfiguration::get_quieten_at_speed),
2059 sigc::mem_fun (*_rc_config, &RCConfiguration::set_quieten_at_speed)
2061 Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), _("This will reduce the unpleasant increase in perceived volume "
2062 "that occurs when fast-forwarding or rewinding through some kinds of audio"));
2063 add_option (_("Transport"), tsf);
2065 add_option (_("Transport"), new OptionEditorHeading (S_("Sync/Slave")));
2067 _sync_source = new ComboOption<SyncSource> (
2069 _("External timecode source"),
2070 sigc::mem_fun (*_rc_config, &RCConfiguration::get_sync_source),
2071 sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_source)
2074 add_option (_("Transport"), _sync_source);
2076 _sync_framerate = new BoolOption (
2077 "timecode-sync-frame-rate",
2078 _("Match session video frame rate to external timecode"),
2079 sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_sync_frame_rate),
2080 sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_sync_frame_rate)
2082 Gtkmm2ext::UI::instance()->set_tip
2083 (_sync_framerate->tip_widget(),
2084 string_compose (_("This option controls the value of the video frame rate <i>while chasing</i> an external timecode source.\n\n"
2085 "<b>When enabled</b> the session video frame rate will be changed to match that of the selected external timecode source.\n\n"
2086 "<b>When disabled</b> the session video frame rate will not be changed to match that of the selected external timecode source."
2087 "Instead the frame rate indication in the main clock will flash red and %1 will convert between the external "
2088 "timecode standard and the session standard."), PROGRAM_NAME));
2090 add_option (_("Transport"), _sync_framerate);
2092 _sync_genlock = new BoolOption (
2093 "timecode-source-is-synced",
2094 _("Sync-lock timecode to clock (disable drift compensation)"),
2095 sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_source_is_synced),
2096 sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_source_is_synced)
2098 Gtkmm2ext::UI::instance()->set_tip
2099 (_sync_genlock->tip_widget(),
2100 string_compose (_("<b>When enabled</b> %1 will never varispeed when slaved to external timecode. "
2101 "Sync Lock indicates that the selected external timecode source shares clock-sync "
2102 "(Black & Burst, Wordclock, etc) with the audio interface. "
2103 "This option disables drift compensation. The transport speed is fixed at 1.0. "
2104 "Vari-speed LTC will be ignored and cause drift."
2106 "<b>When disabled</b> %1 will compensate for potential drift, regardless if the "
2107 "timecode sources shares clock sync."
2111 add_option (_("Transport"), _sync_genlock);
2113 _sync_source_2997 = new BoolOption (
2114 "timecode-source-2997",
2115 _("Lock to 29.9700 fps instead of 30000/1001"),
2116 sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_source_2997),
2117 sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_source_2997)
2119 Gtkmm2ext::UI::instance()->set_tip
2120 (_sync_source_2997->tip_widget(),
2121 _("<b>When enabled</b> the external timecode source is assumed to use 29.97 fps instead of 30000/1001.\n"
2122 "SMPTE 12M-1999 specifies 29.97df as 30000/1001. The spec further mentions that "
2123 "drop-frame timecode has an accumulated error of -86ms over a 24-hour period.\n"
2124 "Drop-frame timecode would compensate exactly for a NTSC color frame rate of 30 * 0.9990 (ie 29.970000). "
2125 "That is not the actual rate. However, some vendors use that rate - despite it being against the specs - "
2126 "because the variant of using exactly 29.97 fps has zero timecode drift.\n"
2129 add_option (_("Transport"), _sync_source_2997);
2131 add_option (_("Transport"), new OptionEditorHeading (S_("LTC Reader")));
2133 _ltc_port = new ComboStringOption (
2135 _("LTC incoming port"),
2136 sigc::mem_fun (*_rc_config, &RCConfiguration::get_ltc_source_port),
2137 sigc::mem_fun (*_rc_config, &RCConfiguration::set_ltc_source_port)
2140 vector<string> physical_inputs;
2141 physical_inputs.push_back (_("None"));
2142 AudioEngine::instance()->get_physical_inputs (DataType::AUDIO, physical_inputs);
2143 _ltc_port->set_popdown_strings (physical_inputs);
2145 populate_sync_options ();
2147 add_option (_("Transport"), _ltc_port);
2149 // TODO; rather disable this button than not compile it..
2150 add_option (_("Transport"), new OptionEditorHeading (S_("LTC Generator")));
2152 add_option (_("Transport"),
2155 _("Enable LTC generator"),
2156 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_ltc),
2157 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_ltc)
2160 _ltc_send_continuously = new BoolOption (
2161 "ltc-send-continuously",
2162 _("Send LTC while stopped"),
2163 sigc::mem_fun (*_rc_config, &RCConfiguration::get_ltc_send_continuously),
2164 sigc::mem_fun (*_rc_config, &RCConfiguration::set_ltc_send_continuously)
2166 Gtkmm2ext::UI::instance()->set_tip
2167 (_ltc_send_continuously->tip_widget(),
2168 string_compose (_("<b>When enabled</b> %1 will continue to send LTC information even when the transport (playhead) is not moving"), PROGRAM_NAME));
2169 add_option (_("Transport"), _ltc_send_continuously);
2171 _ltc_volume_adjustment = new Gtk::Adjustment(-18, -50, 0, .5, 5);
2172 _ltc_volume_adjustment->set_value (20 * log10(_rc_config->get_ltc_output_volume()));
2173 _ltc_volume_adjustment->signal_value_changed().connect (sigc::mem_fun (*this, &RCOptionEditor::ltc_generator_volume_changed));
2174 _ltc_volume_slider = new HSliderOption("ltcvol", _("LTC generator level"), *_ltc_volume_adjustment);
2176 Gtkmm2ext::UI::instance()->set_tip
2177 (_ltc_volume_slider->tip_widget(),
2178 _("Specify the Peak Volume of the generated LTC signal in dbFS. A good value is 0dBu ^= -18dbFS in an EBU calibrated system"));
2180 add_option (_("Transport"), _ltc_volume_slider);
2181 parameter_changed ("send-ltc");
2183 parameter_changed ("sync-source");
2187 add_option (S_("Editor"),
2189 "draggable-playhead",
2190 _("Allow dragging of playhead"),
2191 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_draggable_playhead),
2192 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_draggable_playhead)
2195 add_option (_("Editor"),
2197 "automation-follows-regions",
2198 _("Move relevant automation when audio regions are moved"),
2199 sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_follows_regions),
2200 sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_follows_regions)
2203 add_option (_("Editor"),
2205 "show-track-meters",
2206 _("Show meters on tracks in the editor"),
2207 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_track_meters),
2208 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_track_meters)
2211 add_option (_("Editor"),
2213 "show-editor-meter",
2214 _("Display master-meter in the toolbar"),
2215 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_editor_meter),
2216 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_editor_meter)
2219 ComboOption<FadeShape>* fadeshape = new ComboOption<FadeShape> (
2220 "default-fade-shape",
2221 _("Default fade shape"),
2222 sigc::mem_fun (*_rc_config,
2223 &RCConfiguration::get_default_fade_shape),
2224 sigc::mem_fun (*_rc_config,
2225 &RCConfiguration::set_default_fade_shape)
2228 fadeshape->add (FadeLinear,
2229 _("Linear (for highly correlated material)"));
2230 fadeshape->add (FadeConstantPower, _("Constant power"));
2231 fadeshape->add (FadeSymmetric, _("Symmetric"));
2232 fadeshape->add (FadeSlow, _("Slow"));
2233 fadeshape->add (FadeFast, _("Fast"));
2235 add_option (_("Editor"), fadeshape);
2238 bco = new BoolComboOption (
2239 "use-overlap-equivalency",
2240 _("Regions in active edit groups are edited together"),
2241 _("whenever they overlap in time"),
2242 _("only if they have identical length, position and origin"),
2243 sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_overlap_equivalency),
2244 sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_overlap_equivalency)
2247 add_option (_("Editor"), bco);
2249 ComboOption<LayerModel>* lm = new ComboOption<LayerModel> (
2251 _("Layering model"),
2252 sigc::mem_fun (*_rc_config, &RCConfiguration::get_layer_model),
2253 sigc::mem_fun (*_rc_config, &RCConfiguration::set_layer_model)
2256 lm->add (LaterHigher, _("later is higher"));
2257 lm->add (Manual, _("manual layering"));
2258 add_option (_("Editor"), lm);
2260 add_option (_("Editor"),
2262 "rubberbanding-snaps-to-grid",
2263 _("Make rubberband selection rectangle snap to the grid"),
2264 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_rubberbanding_snaps_to_grid),
2265 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_rubberbanding_snaps_to_grid)
2268 add_option (_("Editor"),
2271 _("Show waveforms in regions"),
2272 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_waveforms),
2273 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_waveforms)
2276 add_option (_("Editor"),
2277 new BoolComboOption (
2278 "show-region-gain-envelopes",
2279 _("Show gain envelopes in audio regions"),
2281 _("only in Draw and Internal Edit modes"),
2282 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_region_gain),
2283 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_region_gain)
2286 ComboOption<WaveformScale>* wfs = new ComboOption<WaveformScale> (
2288 _("Waveform scale"),
2289 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_waveform_scale),
2290 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_waveform_scale)
2293 wfs->add (Linear, _("linear"));
2294 wfs->add (Logarithmic, _("logarithmic"));
2296 add_option (_("Editor"), wfs);
2298 ComboOption<WaveformShape>* wfsh = new ComboOption<WaveformShape> (
2300 _("Waveform shape"),
2301 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_waveform_shape),
2302 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_waveform_shape)
2305 wfsh->add (Traditional, _("traditional"));
2306 wfsh->add (Rectified, _("rectified"));
2308 add_option (_("Editor"), wfsh);
2310 add_option (_("Editor"), new ClipLevelOptions ());
2312 add_option (_("Editor"),
2314 "show-waveforms-while-recording",
2315 _("Show waveforms for audio while it is being recorded"),
2316 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_waveforms_while_recording),
2317 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_waveforms_while_recording)
2320 add_option (_("Editor"),
2323 _("Show zoom toolbar"),
2324 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_zoom_tools),
2325 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_zoom_tools)
2328 add_option (_("Editor"),
2330 "update-editor-during-summary-drag",
2331 _("Update editor window during drags of the summary"),
2332 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_update_editor_during_summary_drag),
2333 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_update_editor_during_summary_drag)
2336 bo = new BoolOption (
2338 _("Name new markers"),
2339 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_name_new_markers),
2340 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_name_new_markers)
2343 add_option (_("Editor"), bo);
2344 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."
2345 "\n\nYou can always rename markers by right-clicking on them"));
2347 add_option (_("Editor"),
2349 "autoscroll-editor",
2350 _("Auto-scroll editor window when dragging near its edges"),
2351 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_autoscroll_editor),
2352 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_autoscroll_editor)
2355 ComboOption<RegionSelectionAfterSplit> *rsas = new ComboOption<RegionSelectionAfterSplit> (
2356 "region-selection-after-split",
2357 _("After splitting selected regions, select"),
2358 sigc::mem_fun (*_rc_config, &RCConfiguration::get_region_selection_after_split),
2359 sigc::mem_fun (*_rc_config, &RCConfiguration::set_region_selection_after_split));
2361 // TODO: decide which of these modes are really useful
2362 rsas->add(None, _("no regions"));
2363 // rsas->add(NewlyCreatedLeft, _("newly-created regions before the split"));
2364 // rsas->add(NewlyCreatedRight, _("newly-created regions after the split"));
2365 rsas->add(NewlyCreatedBoth, _("newly-created regions"));
2366 // rsas->add(Existing, _("unmodified regions in the existing selection"));
2367 // rsas->add(ExistingNewlyCreatedLeft, _("existing selection and newly-created regions before the split"));
2368 // rsas->add(ExistingNewlyCreatedRight, _("existing selection and newly-created regions after the split"));
2369 rsas->add(ExistingNewlyCreatedBoth, _("existing selection and newly-created regions"));
2371 add_option (_("Editor"), rsas);
2376 add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
2378 add_option (_("Audio"), new BufferingOptions (_rc_config));
2380 add_option (_("Audio"), new OptionEditorHeading (_("Monitoring")));
2382 ComboOption<MonitorModel>* mm = new ComboOption<MonitorModel> (
2384 _("Record monitoring handled by"),
2385 sigc::mem_fun (*_rc_config, &RCConfiguration::get_monitoring_model),
2386 sigc::mem_fun (*_rc_config, &RCConfiguration::set_monitoring_model)
2389 if (AudioEngine::instance()->port_engine().can_monitor_input()) {
2390 mm->add (HardwareMonitoring, _("via Audio Driver"));
2393 string prog (PROGRAM_NAME);
2394 boost::algorithm::to_lower (prog);
2395 mm->add (SoftwareMonitoring, string_compose (_("%1"), prog));
2396 mm->add (ExternalMonitoring, _("audio hardware"));
2398 add_option (_("Audio"), mm);
2400 add_option (_("Audio"),
2402 "tape-machine-mode",
2403 _("Tape machine mode"),
2404 sigc::mem_fun (*_rc_config, &RCConfiguration::get_tape_machine_mode),
2405 sigc::mem_fun (*_rc_config, &RCConfiguration::set_tape_machine_mode)
2408 add_option (_("Audio"), new OptionEditorHeading (_("Connection of tracks and busses")));
2410 add_option (_("Audio"),
2412 "auto-connect-standard-busses",
2413 _("Auto-connect master/monitor busses"),
2414 sigc::mem_fun (*_rc_config, &RCConfiguration::get_auto_connect_standard_busses),
2415 sigc::mem_fun (*_rc_config, &RCConfiguration::set_auto_connect_standard_busses)
2418 ComboOption<AutoConnectOption>* iac = new ComboOption<AutoConnectOption> (
2419 "input-auto-connect",
2420 _("Connect track inputs"),
2421 sigc::mem_fun (*_rc_config, &RCConfiguration::get_input_auto_connect),
2422 sigc::mem_fun (*_rc_config, &RCConfiguration::set_input_auto_connect)
2425 iac->add (AutoConnectPhysical, _("automatically to physical inputs"));
2426 iac->add (ManualConnect, _("manually"));
2428 add_option (_("Audio"), iac);
2430 ComboOption<AutoConnectOption>* oac = new ComboOption<AutoConnectOption> (
2431 "output-auto-connect",
2432 _("Connect track and bus outputs"),
2433 sigc::mem_fun (*_rc_config, &RCConfiguration::get_output_auto_connect),
2434 sigc::mem_fun (*_rc_config, &RCConfiguration::set_output_auto_connect)
2437 oac->add (AutoConnectPhysical, _("automatically to physical outputs"));
2438 oac->add (AutoConnectMaster, _("automatically to master bus"));
2439 oac->add (ManualConnect, _("manually"));
2441 add_option (_("Audio"), oac);
2443 add_option (_("Audio"), new OptionEditorHeading (_("Denormals")));
2445 add_option (_("Audio"),
2447 "denormal-protection",
2448 _("Use DC bias to protect against denormals"),
2449 sigc::mem_fun (*_rc_config, &RCConfiguration::get_denormal_protection),
2450 sigc::mem_fun (*_rc_config, &RCConfiguration::set_denormal_protection)
2453 ComboOption<DenormalModel>* dm = new ComboOption<DenormalModel> (
2455 _("Processor handling"),
2456 sigc::mem_fun (*_rc_config, &RCConfiguration::get_denormal_model),
2457 sigc::mem_fun (*_rc_config, &RCConfiguration::set_denormal_model)
2461 dm->add (DenormalNone, _("no processor handling"));
2463 FPU* fpu = FPU::instance();
2465 if (fpu->has_flush_to_zero()) {
2467 dm->add (DenormalFTZ, _("use FlushToZero"));
2468 } else if (_rc_config->get_denormal_model() == DenormalFTZ) {
2469 _rc_config->set_denormal_model(DenormalNone);
2472 if (fpu->has_denormals_are_zero()) {
2474 dm->add (DenormalDAZ, _("use DenormalsAreZero"));
2475 } else if (_rc_config->get_denormal_model() == DenormalDAZ) {
2476 _rc_config->set_denormal_model(DenormalNone);
2479 if (fpu->has_flush_to_zero() && fpu->has_denormals_are_zero()) {
2481 dm->add (DenormalFTZDAZ, _("use FlushToZero and DenormalsAreZero"));
2482 } else if (_rc_config->get_denormal_model() == DenormalFTZDAZ) {
2483 _rc_config->set_denormal_model(DenormalNone);
2487 dm->set_sensitive(false);
2490 add_option (_("Audio"), dm);
2492 add_option (_("Audio"), new OptionEditorHeading (_("Plugins")));
2494 add_option (_("Audio"),
2496 "plugins-stop-with-transport",
2497 _("Silence plugins when the transport is stopped"),
2498 sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugins_stop_with_transport),
2499 sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugins_stop_with_transport)
2502 add_option (_("Audio"),
2504 "new-plugins-active",
2505 _("Make new plugins active"),
2506 sigc::mem_fun (*_rc_config, &RCConfiguration::get_new_plugins_active),
2507 sigc::mem_fun (*_rc_config, &RCConfiguration::set_new_plugins_active)
2510 add_option (_("Audio"), new OptionEditorHeading (_("Regions")));
2512 add_option (_("Audio"),
2514 "auto-analyse-audio",
2515 _("Enable automatic analysis of audio"),
2516 sigc::mem_fun (*_rc_config, &RCConfiguration::get_auto_analyse_audio),
2517 sigc::mem_fun (*_rc_config, &RCConfiguration::set_auto_analyse_audio)
2520 add_option (_("Audio"),
2522 "replicate-missing-region-channels",
2523 _("Replicate missing region channels"),
2524 sigc::mem_fun (*_rc_config, &RCConfiguration::get_replicate_missing_region_channels),
2525 sigc::mem_fun (*_rc_config, &RCConfiguration::set_replicate_missing_region_channels)
2530 add_option (_("Solo / mute"), new OptionEditorHeading (_("Solo")));
2532 add_option (_("Solo / mute"),
2535 _("Solo-in-place mute cut (dB)"),
2536 sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_gain),
2537 sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_gain)
2540 _solo_control_is_listen_control = new BoolOption (
2541 "solo-control-is-listen-control",
2542 _("Solo controls are Listen controls"),
2543 sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control),
2544 sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control)
2547 add_option (_("Solo / mute"), _solo_control_is_listen_control);
2549 _listen_position = new ComboOption<ListenPosition> (
2551 _("Listen Position"),
2552 sigc::mem_fun (*_rc_config, &RCConfiguration::get_listen_position),
2553 sigc::mem_fun (*_rc_config, &RCConfiguration::set_listen_position)
2556 _listen_position->add (AfterFaderListen, _("after-fader (AFL)"));
2557 _listen_position->add (PreFaderListen, _("pre-fader (PFL)"));
2559 add_option (_("Solo / mute"), _listen_position);
2561 ComboOption<PFLPosition>* pp = new ComboOption<PFLPosition> (
2563 _("PFL signals come from"),
2564 sigc::mem_fun (*_rc_config, &RCConfiguration::get_pfl_position),
2565 sigc::mem_fun (*_rc_config, &RCConfiguration::set_pfl_position)
2568 pp->add (PFLFromBeforeProcessors, _("before pre-fader processors"));
2569 pp->add (PFLFromAfterProcessors, _("pre-fader but after pre-fader processors"));
2571 add_option (_("Solo / mute"), pp);
2573 ComboOption<AFLPosition>* pa = new ComboOption<AFLPosition> (
2575 _("AFL signals come from"),
2576 sigc::mem_fun (*_rc_config, &RCConfiguration::get_afl_position),
2577 sigc::mem_fun (*_rc_config, &RCConfiguration::set_afl_position)
2580 pa->add (AFLFromBeforeProcessors, _("immediately post-fader"));
2581 pa->add (AFLFromAfterProcessors, _("after post-fader processors (before pan)"));
2583 add_option (_("Solo / mute"), pa);
2585 parameter_changed ("use-monitor-bus");
2587 add_option (_("Solo / mute"),
2590 _("Exclusive solo"),
2591 sigc::mem_fun (*_rc_config, &RCConfiguration::get_exclusive_solo),
2592 sigc::mem_fun (*_rc_config, &RCConfiguration::set_exclusive_solo)
2595 add_option (_("Solo / mute"),
2598 _("Show solo muting"),
2599 sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_solo_mutes),
2600 sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_solo_mutes)
2603 add_option (_("Solo / mute"),
2605 "solo-mute-override",
2606 _("Soloing overrides muting"),
2607 sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_override),
2608 sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_override)
2611 add_option (_("Solo / mute"), new OptionEditorHeading (_("Default track / bus muting options")));
2613 add_option (_("Solo / mute"),
2615 "mute-affects-pre-fader",
2616 _("Mute affects pre-fader sends"),
2617 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_pre_fader),
2618 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_pre_fader)
2621 add_option (_("Solo / mute"),
2623 "mute-affects-post-fader",
2624 _("Mute affects post-fader sends"),
2625 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_post_fader),
2626 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_post_fader)
2629 add_option (_("Solo / mute"),
2631 "mute-affects-control-outs",
2632 _("Mute affects control outputs"),
2633 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_control_outs),
2634 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_control_outs)
2637 add_option (_("Solo / mute"),
2639 "mute-affects-main-outs",
2640 _("Mute affects main outputs"),
2641 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mute_affects_main_outs),
2642 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_main_outs)
2645 add_option (_("Solo / mute"), new OptionEditorHeading (_("Send Routing")));
2647 add_option (_("Solo / mute"),
2649 "link-send-and-route-panner",
2650 _("Link panners of Aux and External Sends with main panner by default"),
2651 sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_send_and_route_panner),
2652 sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_send_and_route_panner)
2655 add_option (_("MIDI"),
2656 new SpinOption<float> (
2658 _("MIDI read-ahead time (seconds)"),
2659 sigc::mem_fun (*_rc_config, &RCConfiguration::get_midi_readahead),
2660 sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_readahead),
2665 add_option (_("MIDI"),
2668 _("Send MIDI Clock"),
2669 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_midi_clock),
2670 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_midi_clock)
2673 add_option (_("MIDI"),
2676 _("Send MIDI Time Code"),
2677 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_mtc),
2678 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mtc)
2681 add_option (_("MIDI"),
2682 new SpinOption<int> (
2683 "mtc-qf-speed-tolerance",
2684 _("Percentage either side of normal transport speed to transmit MTC"),
2685 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mtc_qf_speed_tolerance),
2686 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mtc_qf_speed_tolerance),
2690 add_option (_("MIDI"),
2693 _("Obey MIDI Machine Control commands"),
2694 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mmc_control),
2695 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_control)
2698 add_option (_("MIDI"),
2701 _("Send MIDI Machine Control commands"),
2702 sigc::mem_fun (*_rc_config, &RCConfiguration::get_send_mmc),
2703 sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mmc)
2706 add_option (_("MIDI"),
2709 _("Send MIDI control feedback"),
2710 sigc::mem_fun (*_rc_config, &RCConfiguration::get_midi_feedback),
2711 sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_feedback)
2714 add_option (_("MIDI"),
2715 new SpinOption<uint8_t> (
2716 "mmc-receive-device-id",
2717 _("Inbound MMC device ID"),
2718 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mmc_receive_device_id),
2719 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_receive_device_id),
2723 add_option (_("MIDI"),
2724 new SpinOption<uint8_t> (
2725 "mmc-send-device-id",
2726 _("Outbound MMC device ID"),
2727 sigc::mem_fun (*_rc_config, &RCConfiguration::get_mmc_send_device_id),
2728 sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_send_device_id),
2732 add_option (_("MIDI"),
2733 new SpinOption<int32_t> (
2734 "initial-program-change",
2735 _("Initial program change"),
2736 sigc::mem_fun (*_rc_config, &RCConfiguration::get_initial_program_change),
2737 sigc::mem_fun (*_rc_config, &RCConfiguration::set_initial_program_change),
2741 add_option (_("MIDI"),
2743 "display-first-midi-bank-as-zero",
2744 _("Display first MIDI bank/program as 0"),
2745 sigc::mem_fun (*_rc_config, &RCConfiguration::get_first_midi_bank_is_zero),
2746 sigc::mem_fun (*_rc_config, &RCConfiguration::set_first_midi_bank_is_zero)
2749 add_option (_("MIDI"),
2751 "never-display-periodic-midi",
2752 _("Never display periodic MIDI messages (MTC, MIDI Clock)"),
2753 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_never_display_periodic_midi),
2754 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_never_display_periodic_midi)
2757 add_option (_("MIDI"),
2760 _("Sound MIDI notes as they are selected"),
2761 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_sound_midi_notes),
2762 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_sound_midi_notes)
2765 add_option (_("MIDI"), new OptionEditorHeading (_("Midi Audition")));
2767 ComboOption<std::string>* audition_synth = new ComboOption<std::string> (
2768 "midi-audition-synth-uri",
2769 _("Midi Audition Synth (LV2)"),
2770 sigc::mem_fun (*_rc_config, &RCConfiguration::get_midi_audition_synth_uri),
2771 sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_audition_synth_uri)
2774 audition_synth->add(X_(""), _("None"));
2775 PluginInfoList all_plugs;
2776 PluginManager& manager (PluginManager::instance());
2778 all_plugs.insert (all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end());
2780 for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end(); ++i) {
2781 if (manager.get_status (*i) == PluginManager::Hidden) continue;
2782 if (!(*i)->is_instrument()) continue;
2783 if ((*i)->type != ARDOUR::LV2) continue;
2784 audition_synth->add((*i)->unique_id, (*i)->name);
2788 add_option (_("MIDI"), audition_synth);
2790 /* USER INTERACTION */
2793 #ifdef PLATFORM_WINDOWS
2796 getenv ("ARDOUR_BUNDLED")
2800 add_option (_("User interaction"),
2802 "enable-translation",
2803 string_compose (_("Use translations of %1 messages\n"
2804 " <i>(requires a restart of %1 to take effect)</i>\n"
2805 " <i>(if available for your language preferences)</i>"), PROGRAM_NAME),
2806 sigc::ptr_fun (ARDOUR::translations_are_enabled),
2807 sigc::ptr_fun (ARDOUR::set_translations_enabled)));
2810 add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
2812 add_option (_("User interaction"), new KeyboardOptions);
2814 /* Control Surfaces */
2816 add_option (_("Control Surfaces"), new ControlSurfacesOptions (*this));
2818 ComboOption<RemoteModel>* rm = new ComboOption<RemoteModel> (
2820 _("Control surface remote ID"),
2821 sigc::mem_fun (*_rc_config, &RCConfiguration::get_remote_model),
2822 sigc::mem_fun (*_rc_config, &RCConfiguration::set_remote_model)
2825 rm->add (UserOrdered, _("assigned by user"));
2826 rm->add (MixerOrdered, _("follows order of mixer"));
2828 add_option (_("Control Surfaces"), rm);
2830 /* VIDEO Timeline */
2831 add_option (_("Video"), new VideoTimelineOptions (_rc_config));
2833 #if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined AUDIOUNIT_SUPPORT)
2834 /* Plugin options (currrently VST only) */
2835 add_option (_("Plugins"), new PluginOptions (_rc_config));
2840 #ifdef OPTIONAL_CAIRO_IMAGE_SURFACE
2841 BoolOption* bgc = new BoolOption (
2842 "cairo-image-surface",
2843 _("Disable Graphics Hardware Acceleration (requires restart)"),
2844 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_cairo_image_surface),
2845 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_cairo_image_surface)
2848 Gtkmm2ext::UI::instance()->set_tip (bgc->tip_widget(), string_compose (
2849 _("Render large parts of the application user-interface in software, instead of using 2D-graphics acceleration.\nThis requires restarting %1 before having an effect"), PROGRAM_NAME));
2850 add_option (S_("Preferences|GUI"), bgc);
2853 #ifdef CAIRO_SUPPORTS_FORCE_BUGGY_GRADIENTS_ENVIRONMENT_VARIABLE
2854 BoolOption* bgo = new BoolOption (
2856 _("Possibly improve slow graphical performance (requires restart)"),
2857 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_buggy_gradients),
2858 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_buggy_gradients)
2861 Gtkmm2ext::UI::instance()->set_tip (bgo->tip_widget(), string_compose (_("Disables hardware gradient rendering on buggy video drivers (\"buggy gradients patch\").\nThis requires restarting %1 before having an effect"), PROGRAM_NAME));
2862 add_option (S_("Preferences|GUI"), bgo);
2865 add_option (S_("Preferences|GUI"),
2868 _("Graphically indicate mouse pointer hovering over various widgets"),
2869 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_widget_prelight),
2870 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_widget_prelight)
2873 #ifdef TOOLTIPS_GOT_FIXED
2874 add_option (S_("Preferences|GUI"),
2877 _("Show tooltips if mouse hovers over a control"),
2878 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_use_tooltips),
2879 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_use_tooltips)
2883 add_option (S_("Preferences|GUI"),
2885 "show-name-highlight",
2886 _("Use name highlight bars in region displays (requires a restart)"),
2887 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_name_highlight),
2888 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_name_highlight)
2892 /* font scaling does nothing with GDK/Quartz */
2893 add_option (S_("Preferences|GUI"), new FontScalingOptions ());
2896 add_option (S_("GUI"),
2898 "super-rapid-clock-update",
2899 _("update transport clock display at FPS instead of every 100ms"),
2900 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_super_rapid_clock_update),
2901 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_super_rapid_clock_update)
2905 /* Image cache size */
2907 Gtk::Adjustment *ics = manage (new Gtk::Adjustment(0, 1, 1024, 10)); /* 1 MB to 1GB in steps of 10MB */
2908 HSliderOption *sics = new HSliderOption("waveform-cache-size",
2909 _("Waveform image cache size (megabytes)"),
2911 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_waveform_cache_size),
2912 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_waveform_cache_size)
2914 sics->scale().set_digits (0);
2915 Gtkmm2ext::UI::instance()->set_tip
2916 (sics->tip_widget(),
2917 _("Increasing the cache size uses more memory to store waveform images, which can improve graphical performance."));
2918 add_option (S_("Preferences|GUI"), sics);
2920 /* Lock GUI timeout */
2922 Gtk::Adjustment *lts = manage (new Gtk::Adjustment(0, 0, 1000, 1, 10));
2923 HSliderOption *slts = new HSliderOption("lock-gui-after-seconds",
2924 _("Lock timeout (seconds)"),
2926 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_lock_gui_after_seconds),
2927 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_lock_gui_after_seconds)
2929 slts->scale().set_digits (0);
2930 Gtkmm2ext::UI::instance()->set_tip
2931 (slts->tip_widget(),
2932 _("Lock GUI after this many idle seconds (zero to never lock)"));
2933 add_option (S_("Preferences|GUI"), slts);
2935 /* The names of these controls must be the same as those given in MixerStrip
2936 for the actual widgets being controlled.
2938 _mixer_strip_visibility.add (0, X_("Input"), _("Input"));
2939 _mixer_strip_visibility.add (0, X_("PhaseInvert"), _("Phase Invert"));
2940 _mixer_strip_visibility.add (0, X_("RecMon"), _("Record & Monitor"));
2941 _mixer_strip_visibility.add (0, X_("SoloIsoLock"), _("Solo Iso / Lock"));
2942 _mixer_strip_visibility.add (0, X_("Output"), _("Output"));
2943 _mixer_strip_visibility.add (0, X_("Comments"), _("Comments"));
2946 S_("Preferences|GUI"),
2947 new VisibilityOption (
2949 &_mixer_strip_visibility,
2950 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_mixer_strip_visibility),
2951 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_mixer_strip_visibility)
2955 add_option (S_("Preferences|GUI"),
2957 "default-narrow_ms",
2958 _("Use narrow strips in the mixer by default"),
2959 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_default_narrow_ms),
2960 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_default_narrow_ms)
2963 add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Metering")));
2965 ComboOption<float>* mht = new ComboOption<float> (
2967 _("Peak hold time"),
2968 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_meter_hold),
2969 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_hold)
2972 mht->add (MeterHoldOff, _("off"));
2973 mht->add (MeterHoldShort, _("short"));
2974 mht->add (MeterHoldMedium, _("medium"));
2975 mht->add (MeterHoldLong, _("long"));
2977 add_option (S_("Preferences|Metering"), mht);
2979 ComboOption<float>* mfo = new ComboOption<float> (
2982 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_falloff),
2983 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_falloff)
2986 mfo->add (METER_FALLOFF_OFF, _("off"));
2987 mfo->add (METER_FALLOFF_SLOWEST, _("slowest [6.6dB/sec]"));
2988 mfo->add (METER_FALLOFF_SLOW, _("slow [8.6dB/sec] (BBC PPM, EBU PPM)"));
2989 mfo->add (METER_FALLOFF_SLOWISH, _("moderate [12.0dB/sec] (DIN)"));
2990 mfo->add (METER_FALLOFF_MODERATE, _("medium [13.3dB/sec] (EBU Digi PPM, IRT Digi PPM)"));
2991 mfo->add (METER_FALLOFF_MEDIUM, _("fast [20dB/sec]"));
2992 mfo->add (METER_FALLOFF_FAST, _("very fast [32dB/sec]"));
2994 add_option (S_("Preferences|Metering"), mfo);
2996 ComboOption<MeterLineUp>* mlu = new ComboOption<MeterLineUp> (
2997 "meter-line-up-level",
2998 _("Meter line-up level; 0dBu"),
2999 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_meter_line_up_level),
3000 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_line_up_level)
3003 mlu->add (MeteringLineUp24, _("-24dBFS (SMPTE US: 4dBu = -20dBFS)"));
3004 mlu->add (MeteringLineUp20, _("-20dBFS (SMPTE RP.0155)"));
3005 mlu->add (MeteringLineUp18, _("-18dBFS (EBU, BBC)"));
3006 mlu->add (MeteringLineUp15, _("-15dBFS (DIN)"));
3008 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."));
3010 add_option (S_("Preferences|Metering"), mlu);
3012 ComboOption<MeterLineUp>* mld = new ComboOption<MeterLineUp> (
3013 "meter-line-up-din",
3014 _("IEC1/DIN Meter line-up level; 0dBu"),
3015 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_meter_line_up_din),
3016 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_line_up_din)
3019 mld->add (MeteringLineUp24, _("-24dBFS (SMPTE US: 4dBu = -20dBFS)"));
3020 mld->add (MeteringLineUp20, _("-20dBFS (SMPTE RP.0155)"));
3021 mld->add (MeteringLineUp18, _("-18dBFS (EBU, BBC)"));
3022 mld->add (MeteringLineUp15, _("-15dBFS (DIN)"));
3024 Gtkmm2ext::UI::instance()->set_tip (mld->tip_widget(), _("Reference level for IEC1/DIN meter."));
3026 add_option (S_("Preferences|Metering"), mld);
3028 ComboOption<VUMeterStandard>* mvu = new ComboOption<VUMeterStandard> (
3029 "meter-vu-standard",
3030 _("VU Meter standard"),
3031 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_meter_vu_standard),
3032 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_vu_standard)
3035 mvu->add (MeteringVUfrench, _("0VU = -2dBu (France)"));
3036 mvu->add (MeteringVUamerican, _("0VU = 0dBu (North America, Australia)"));
3037 mvu->add (MeteringVUstandard, _("0VU = +4dBu (standard)"));
3038 mvu->add (MeteringVUeight, _("0VU = +8dBu"));
3040 add_option (S_("Preferences|Metering"), mvu);
3042 Gtk::Adjustment *mpk = manage (new Gtk::Adjustment(0, -10, 0, .1, .1));
3043 HSliderOption *mpks = new HSliderOption("meter-peak",
3044 _("Peak threshold [dBFS]"),
3046 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_meter_peak),
3047 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_peak)
3051 ComboOption<MeterType>* mtm = new ComboOption<MeterType> (
3052 "meter-type-master",
3053 _("Default Meter Type for Master Bus"),
3054 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_type_master),
3055 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_type_master)
3057 mtm->add (MeterPeak, ArdourMeter::meter_type_string(MeterPeak));
3058 mtm->add (MeterK20, ArdourMeter::meter_type_string(MeterK20));
3059 mtm->add (MeterK14, ArdourMeter::meter_type_string(MeterK14));
3060 mtm->add (MeterK12, ArdourMeter::meter_type_string(MeterK12));
3061 mtm->add (MeterIEC1DIN, ArdourMeter::meter_type_string(MeterIEC1DIN));
3062 mtm->add (MeterIEC1NOR, ArdourMeter::meter_type_string(MeterIEC1NOR));
3063 mtm->add (MeterIEC2BBC, ArdourMeter::meter_type_string(MeterIEC2BBC));
3064 mtm->add (MeterIEC2EBU, ArdourMeter::meter_type_string(MeterIEC2EBU));
3066 add_option (S_("Preferences|Metering"), mtm);
3069 ComboOption<MeterType>* mtb = new ComboOption<MeterType> (
3071 _("Default Meter Type for Busses"),
3072 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_type_bus),
3073 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_type_bus)
3075 mtb->add (MeterPeak, ArdourMeter::meter_type_string(MeterPeak));
3076 mtb->add (MeterK20, ArdourMeter::meter_type_string(MeterK20));
3077 mtb->add (MeterK14, ArdourMeter::meter_type_string(MeterK14));
3078 mtb->add (MeterK12, ArdourMeter::meter_type_string(MeterK12));
3079 mtb->add (MeterIEC1DIN, ArdourMeter::meter_type_string(MeterIEC1DIN));
3080 mtb->add (MeterIEC1NOR, ArdourMeter::meter_type_string(MeterIEC1NOR));
3081 mtb->add (MeterIEC2BBC, ArdourMeter::meter_type_string(MeterIEC2BBC));
3082 mtb->add (MeterIEC2EBU, ArdourMeter::meter_type_string(MeterIEC2EBU));
3084 add_option (S_("Preferences|Metering"), mtb);
3086 ComboOption<MeterType>* mtt = new ComboOption<MeterType> (
3088 _("Default Meter Type for Tracks"),
3089 sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_type_track),
3090 sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_type_track)
3092 mtt->add (MeterPeak, ArdourMeter::meter_type_string(MeterPeak));
3093 mtt->add (MeterPeak0dB, ArdourMeter::meter_type_string(MeterPeak0dB));
3095 add_option (S_("Preferences|Metering"), mtt);
3098 Gtkmm2ext::UI::instance()->set_tip
3099 (mpks->tip_widget(),
3100 _("Specify the audio signal level in dbFS at and above which the meter-peak indicator will flash red."));
3102 add_option (S_("Preferences|Metering"), mpks);
3104 add_option (S_("Preferences|Metering"),
3107 _("LED meter style"),
3108 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_meter_style_led),
3109 sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_style_led)
3112 /* and now the theme manager */
3114 ThemeManager* tm = manage (new ThemeManager);
3115 add_page (_("Theme"), *tm);
3119 RCOptionEditor::parameter_changed (string const & p)
3121 OptionEditor::parameter_changed (p);
3123 if (p == "use-monitor-bus") {
3124 bool const s = Config->get_use_monitor_bus ();
3126 /* we can't use this if we don't have a monitor bus */
3127 Config->set_solo_control_is_listen_control (false);
3129 _solo_control_is_listen_control->set_sensitive (s);
3130 _listen_position->set_sensitive (s);
3131 } else if (p == "sync-source") {
3132 _sync_source->set_sensitive (true);
3134 _sync_source->set_sensitive (!_session->config.get_external_sync());
3136 switch(Config->get_sync_source()) {
3139 _sync_genlock->set_sensitive (true);
3140 _sync_framerate->set_sensitive (true);
3141 _sync_source_2997->set_sensitive (true);
3144 _sync_genlock->set_sensitive (false);
3145 _sync_framerate->set_sensitive (false);
3146 _sync_source_2997->set_sensitive (false);
3149 } else if (p == "send-ltc") {
3150 bool const s = Config->get_send_ltc ();
3151 _ltc_send_continuously->set_sensitive (s);
3152 _ltc_volume_slider->set_sensitive (s);
3156 void RCOptionEditor::ltc_generator_volume_changed () {
3157 _rc_config->set_ltc_output_volume (pow(10, _ltc_volume_adjustment->get_value() / 20));
3161 RCOptionEditor::populate_sync_options ()
3163 vector<SyncSource> sync_opts = ARDOUR::get_available_sync_options ();
3165 _sync_source->clear ();
3167 for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) {
3168 _sync_source->add (*i, sync_source_to_string (*i));
3171 if (sync_opts.empty()) {
3172 _sync_source->set_sensitive(false);
3174 if (std::find(sync_opts.begin(), sync_opts.end(), _rc_config->get_sync_source()) == sync_opts.end()) {
3175 _rc_config->set_sync_source(sync_opts.front());