2 Copyright (C) 2001-2011 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "gtk2ardour-config.h"
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/stock.h>
26 #include <gtkmm/scale.h>
27 #include <gtkmm2ext/utils.h>
28 #include <gtkmm2ext/slider_controller.h>
33 #include "midi++/manager.h"
35 #include "ardour/audioengine.h"
36 #include "ardour/dB.h"
37 #include "ardour/rc_configuration.h"
38 #include "ardour/control_protocol_manager.h"
39 #include "control_protocol/control_protocol.h"
41 #include "gui_thread.h"
42 #include "midi_tracer.h"
43 #include "rc_option_editor.h"
45 #include "midi_port_dialog.h"
52 using namespace Gtkmm2ext
;
54 using namespace ARDOUR
;
56 class ClickOptions
: public OptionEditorBox
59 ClickOptions (RCConfiguration
* c
, ArdourDialog
* p
)
63 Table
* t
= manage (new Table (2, 3));
66 Label
* l
= manage (new Label (_("Click audio file:")));
67 l
->set_alignment (0, 0.5);
68 t
->attach (*l
, 0, 1, 0, 1, FILL
);
69 t
->attach (_click_path_entry
, 1, 2, 0, 1, FILL
);
70 Button
* b
= manage (new Button (_("Browse...")));
71 b
->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_browse_clicked
));
72 t
->attach (*b
, 2, 3, 0, 1, FILL
);
74 l
= manage (new Label (_("Click emphasis audio file:")));
75 l
->set_alignment (0, 0.5);
76 t
->attach (*l
, 0, 1, 1, 2, FILL
);
77 t
->attach (_click_emphasis_path_entry
, 1, 2, 1, 2, FILL
);
78 b
= manage (new Button (_("Browse...")));
79 b
->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked
));
80 t
->attach (*b
, 2, 3, 1, 2, FILL
);
82 _box
->pack_start (*t
, false, false);
85 void parameter_changed (string
const & p
)
87 if (p
== "click-sound") {
88 _click_path_entry
.set_text (_rc_config
->get_click_sound());
89 } else if (p
== "click-emphasis-sound") {
90 _click_emphasis_path_entry
.set_text (_rc_config
->get_click_emphasis_sound());
94 void set_state_from_config ()
96 parameter_changed ("click-sound");
97 parameter_changed ("click-emphasis-sound");
102 void click_browse_clicked ()
104 SoundFileChooser
sfdb (*_parent
, _("Choose Click"));
109 if (sfdb
.run () == RESPONSE_OK
) {
110 click_chosen (sfdb
.get_filename());
114 void click_chosen (string
const & path
)
116 _click_path_entry
.set_text (path
);
117 _rc_config
->set_click_sound (path
);
120 void click_emphasis_browse_clicked ()
122 SoundFileChooser
sfdb (*_parent
, _("Choose Click Emphasis"));
127 if (sfdb
.run () == RESPONSE_OK
) {
128 click_emphasis_chosen (sfdb
.get_filename());
132 void click_emphasis_chosen (string
const & path
)
134 _click_emphasis_path_entry
.set_text (path
);
135 _rc_config
->set_click_emphasis_sound (path
);
138 RCConfiguration
* _rc_config
;
139 ArdourDialog
* _parent
;
140 Entry _click_path_entry
;
141 Entry _click_emphasis_path_entry
;
144 class UndoOptions
: public OptionEditorBox
147 UndoOptions (RCConfiguration
* c
) :
149 _limit_undo_button (_("Limit undo history to")),
150 _save_undo_button (_("Save undo history of"))
152 Table
* t
= new Table (2, 3);
155 t
->attach (_limit_undo_button
, 0, 1, 0, 1, FILL
);
156 _limit_undo_spin
.set_range (0, 512);
157 _limit_undo_spin
.set_increments (1, 10);
158 t
->attach (_limit_undo_spin
, 1, 2, 0, 1, FILL
| EXPAND
);
159 Label
* l
= manage (new Label (_("commands")));
160 l
->set_alignment (0, 0.5);
161 t
->attach (*l
, 2, 3, 0, 1);
163 t
->attach (_save_undo_button
, 0, 1, 1, 2, FILL
);
164 _save_undo_spin
.set_range (0, 512);
165 _save_undo_spin
.set_increments (1, 10);
166 t
->attach (_save_undo_spin
, 1, 2, 1, 2, FILL
| EXPAND
);
167 l
= manage (new Label (_("commands")));
168 l
->set_alignment (0, 0.5);
169 t
->attach (*l
, 2, 3, 1, 2);
171 _box
->pack_start (*t
);
173 _limit_undo_button
.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_toggled
));
174 _limit_undo_spin
.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_changed
));
175 _save_undo_button
.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_toggled
));
176 _save_undo_spin
.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_changed
));
179 void parameter_changed (string
const & p
)
181 if (p
== "history-depth") {
182 int32_t const d
= _rc_config
->get_history_depth();
183 _limit_undo_button
.set_active (d
!= 0);
184 _limit_undo_spin
.set_sensitive (d
!= 0);
185 _limit_undo_spin
.set_value (d
);
186 } else if (p
== "save-history") {
187 bool const x
= _rc_config
->get_save_history ();
188 _save_undo_button
.set_active (x
);
189 _save_undo_spin
.set_sensitive (x
);
190 } else if (p
== "save-history-depth") {
191 _save_undo_spin
.set_value (_rc_config
->get_saved_history_depth());
195 void set_state_from_config ()
197 parameter_changed ("save-history");
198 parameter_changed ("history-depth");
199 parameter_changed ("save-history-depth");
202 void limit_undo_toggled ()
204 bool const x
= _limit_undo_button
.get_active ();
205 _limit_undo_spin
.set_sensitive (x
);
206 int32_t const n
= x
? 16 : 0;
207 _limit_undo_spin
.set_value (n
);
208 _rc_config
->set_history_depth (n
);
211 void limit_undo_changed ()
213 _rc_config
->set_history_depth (_limit_undo_spin
.get_value_as_int ());
216 void save_undo_toggled ()
218 bool const x
= _save_undo_button
.get_active ();
219 _rc_config
->set_save_history (x
);
222 void save_undo_changed ()
224 _rc_config
->set_saved_history_depth (_save_undo_spin
.get_value_as_int ());
228 RCConfiguration
* _rc_config
;
229 CheckButton _limit_undo_button
;
230 SpinButton _limit_undo_spin
;
231 CheckButton _save_undo_button
;
232 SpinButton _save_undo_spin
;
237 static const struct {
249 { "Shift", GDK_SHIFT_MASK
},
250 { "Command", GDK_META_MASK
},
251 { "Control", GDK_CONTROL_MASK
},
252 { "Option", GDK_MOD1_MASK
},
253 { "Command-Shift", GDK_META_MASK
|GDK_SHIFT_MASK
},
254 { "Command-Option", GDK_MOD1_MASK
|GDK_META_MASK
},
255 { "Shift-Option", GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
256 { "Shift-Command-Option", GDK_MOD5_MASK
|GDK_SHIFT_MASK
|GDK_META_MASK
},
259 { "Shift", GDK_SHIFT_MASK
},
260 { "Control", GDK_CONTROL_MASK
},
261 { "Alt (Mod1)", GDK_MOD1_MASK
},
262 { "Control-Shift", GDK_CONTROL_MASK
|GDK_SHIFT_MASK
},
263 { "Control-Alt", GDK_CONTROL_MASK
|GDK_MOD1_MASK
},
264 { "Shift-Alt", GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
265 { "Control-Shift-Alt", GDK_CONTROL_MASK
|GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
266 { "Mod2", GDK_MOD2_MASK
},
267 { "Mod3", GDK_MOD3_MASK
},
268 { "Mod4", GDK_MOD4_MASK
},
269 { "Mod5", GDK_MOD5_MASK
},
275 class KeyboardOptions
: public OptionEditorBox
279 _delete_button_adjustment (3, 1, 12),
280 _delete_button_spin (_delete_button_adjustment
),
281 _edit_button_adjustment (3, 1, 5),
282 _edit_button_spin (_edit_button_adjustment
),
283 _insert_note_button_adjustment (3, 1, 5),
284 _insert_note_button_spin (_insert_note_button_adjustment
)
288 /* internationalize and prepare for use with combos */
291 for (int i
= 0; modifiers
[i
].name
; ++i
) {
292 dumb
.push_back (_(modifiers
[i
].name
));
295 set_popdown_strings (_edit_modifier_combo
, dumb
);
296 _edit_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_modifier_chosen
));
298 for (int x
= 0; modifiers
[x
].name
; ++x
) {
299 if (modifiers
[x
].modifier
== Keyboard::edit_modifier ()) {
300 _edit_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
305 Table
* t
= manage (new Table (4, 4));
308 Label
* l
= manage (new Label (_("Edit using:")));
309 l
->set_name ("OptionsLabel");
310 l
->set_alignment (0, 0.5);
312 t
->attach (*l
, 0, 1, 0, 1, FILL
| EXPAND
, FILL
);
313 t
->attach (_edit_modifier_combo
, 1, 2, 0, 1, FILL
| EXPAND
, FILL
);
315 l
= manage (new Label (_("+ button")));
316 l
->set_name ("OptionsLabel");
318 t
->attach (*l
, 3, 4, 0, 1, FILL
| EXPAND
, FILL
);
319 t
->attach (_edit_button_spin
, 4, 5, 0, 1, FILL
| EXPAND
, FILL
);
321 _edit_button_spin
.set_name ("OptionsEntry");
322 _edit_button_adjustment
.set_value (Keyboard::edit_button());
323 _edit_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_button_changed
));
325 set_popdown_strings (_delete_modifier_combo
, dumb
);
326 _delete_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_modifier_chosen
));
328 for (int x
= 0; modifiers
[x
].name
; ++x
) {
329 if (modifiers
[x
].modifier
== Keyboard::delete_modifier ()) {
330 _delete_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
335 l
= manage (new Label (_("Delete using:")));
336 l
->set_name ("OptionsLabel");
337 l
->set_alignment (0, 0.5);
339 t
->attach (*l
, 0, 1, 1, 2, FILL
| EXPAND
, FILL
);
340 t
->attach (_delete_modifier_combo
, 1, 2, 1, 2, FILL
| EXPAND
, FILL
);
342 l
= manage (new Label (_("+ button")));
343 l
->set_name ("OptionsLabel");
345 t
->attach (*l
, 3, 4, 1, 2, FILL
| EXPAND
, FILL
);
346 t
->attach (_delete_button_spin
, 4, 5, 1, 2, FILL
| EXPAND
, FILL
);
348 _delete_button_spin
.set_name ("OptionsEntry");
349 _delete_button_adjustment
.set_value (Keyboard::delete_button());
350 _delete_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed
));
353 set_popdown_strings (_insert_note_modifier_combo
, dumb
);
354 _insert_note_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen
));
356 for (int x
= 0; modifiers
[x
].name
; ++x
) {
357 if (modifiers
[x
].modifier
== Keyboard::insert_note_modifier ()) {
358 _insert_note_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
363 l
= manage (new Label (_("Insert note using:")));
364 l
->set_name ("OptionsLabel");
365 l
->set_alignment (0, 0.5);
367 t
->attach (*l
, 0, 1, 2, 3, FILL
| EXPAND
, FILL
);
368 t
->attach (_insert_note_modifier_combo
, 1, 2, 2, 3, FILL
| EXPAND
, FILL
);
370 l
= manage (new Label (_("+ button")));
371 l
->set_name ("OptionsLabel");
373 t
->attach (*l
, 3, 4, 2, 3, FILL
| EXPAND
, FILL
);
374 t
->attach (_insert_note_button_spin
, 4, 5, 2, 3, FILL
| EXPAND
, FILL
);
376 _insert_note_button_spin
.set_name ("OptionsEntry");
377 _insert_note_button_adjustment
.set_value (Keyboard::insert_note_button());
378 _insert_note_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed
));
381 set_popdown_strings (_snap_modifier_combo
, dumb
);
382 _snap_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen
));
384 for (int x
= 0; modifiers
[x
].name
; ++x
) {
385 if (modifiers
[x
].modifier
== (guint
) Keyboard::snap_modifier ()) {
386 _snap_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
391 l
= manage (new Label (_("Toggle snap using:")));
392 l
->set_name ("OptionsLabel");
393 l
->set_alignment (0, 0.5);
395 t
->attach (*l
, 0, 1, 3, 4, FILL
| EXPAND
, FILL
);
396 t
->attach (_snap_modifier_combo
, 1, 2, 3, 4, FILL
| EXPAND
, FILL
);
400 for (map
<string
,string
>::iterator bf
= Keyboard::binding_files
.begin(); bf
!= Keyboard::binding_files
.end(); ++bf
) {
401 strs
.push_back (bf
->first
);
404 set_popdown_strings (_keyboard_layout_selector
, strs
);
405 _keyboard_layout_selector
.set_active_text (Keyboard::current_binding_name());
406 _keyboard_layout_selector
.signal_changed().connect (sigc::mem_fun (*this, &KeyboardOptions::bindings_changed
));
408 l
= manage (new Label (_("Keyboard layout:")));
409 l
->set_name ("OptionsLabel");
410 l
->set_alignment (0, 0.5);
412 t
->attach (*l
, 0, 1, 4, 5, FILL
| EXPAND
, FILL
);
413 t
->attach (_keyboard_layout_selector
, 1, 2, 4, 5, FILL
| EXPAND
, FILL
);
415 _box
->pack_start (*t
, false, false);
418 void parameter_changed (string
const &)
420 /* XXX: these aren't really config options... */
423 void set_state_from_config ()
425 /* XXX: these aren't really config options... */
430 void bindings_changed ()
432 string
const txt
= _keyboard_layout_selector
.get_active_text();
434 /* XXX: config...? for all this keyboard stuff */
436 for (map
<string
,string
>::iterator i
= Keyboard::binding_files
.begin(); i
!= Keyboard::binding_files
.end(); ++i
) {
437 if (txt
== i
->first
) {
438 if (Keyboard::load_keybindings (i
->second
)) {
439 Keyboard::save_keybindings ();
445 void edit_modifier_chosen ()
447 string
const txt
= _edit_modifier_combo
.get_active_text();
449 for (int i
= 0; modifiers
[i
].name
; ++i
) {
450 if (txt
== _(modifiers
[i
].name
)) {
451 Keyboard::set_edit_modifier (modifiers
[i
].modifier
);
457 void delete_modifier_chosen ()
459 string
const txt
= _delete_modifier_combo
.get_active_text();
461 for (int i
= 0; modifiers
[i
].name
; ++i
) {
462 if (txt
== _(modifiers
[i
].name
)) {
463 Keyboard::set_delete_modifier (modifiers
[i
].modifier
);
469 void insert_note_modifier_chosen ()
471 string
const txt
= _insert_note_modifier_combo
.get_active_text();
473 for (int i
= 0; modifiers
[i
].name
; ++i
) {
474 if (txt
== _(modifiers
[i
].name
)) {
475 Keyboard::set_insert_note_modifier (modifiers
[i
].modifier
);
481 void snap_modifier_chosen ()
483 string
const txt
= _snap_modifier_combo
.get_active_text();
485 for (int i
= 0; modifiers
[i
].name
; ++i
) {
486 if (txt
== _(modifiers
[i
].name
)) {
487 Keyboard::set_snap_modifier (modifiers
[i
].modifier
);
493 void delete_button_changed ()
495 Keyboard::set_delete_button (_delete_button_spin
.get_value_as_int());
498 void edit_button_changed ()
500 Keyboard::set_edit_button (_edit_button_spin
.get_value_as_int());
503 void insert_note_button_changed ()
505 Keyboard::set_insert_note_button (_insert_note_button_spin
.get_value_as_int());
508 ComboBoxText _keyboard_layout_selector
;
509 ComboBoxText _edit_modifier_combo
;
510 ComboBoxText _delete_modifier_combo
;
511 ComboBoxText _insert_note_modifier_combo
;
512 ComboBoxText _snap_modifier_combo
;
513 Adjustment _delete_button_adjustment
;
514 SpinButton _delete_button_spin
;
515 Adjustment _edit_button_adjustment
;
516 SpinButton _edit_button_spin
;
517 Adjustment _insert_note_button_adjustment
;
518 SpinButton _insert_note_button_spin
;
522 class FontScalingOptions
: public OptionEditorBox
525 FontScalingOptions (RCConfiguration
* c
) :
527 _dpi_adjustment (50, 50, 250, 1, 10),
528 _dpi_slider (_dpi_adjustment
)
530 _dpi_adjustment
.set_value (_rc_config
->get_font_scale () / 1024);
532 Label
* l
= manage (new Label (_("Font scaling:")));
533 l
->set_name ("OptionsLabel");
535 _dpi_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
536 HBox
* h
= manage (new HBox
);
538 h
->pack_start (*l
, false, false);
539 h
->pack_start (_dpi_slider
, true, true);
541 _box
->pack_start (*h
, false, false);
543 _dpi_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &FontScalingOptions::dpi_changed
));
546 void parameter_changed (string
const & p
)
548 if (p
== "font-scale") {
549 _dpi_adjustment
.set_value (_rc_config
->get_font_scale() / 1024);
553 void set_state_from_config ()
555 parameter_changed ("font-scale");
562 _rc_config
->set_font_scale ((long) floor (_dpi_adjustment
.get_value() * 1024));
563 /* XXX: should be triggered from the parameter changed signal */
567 RCConfiguration
* _rc_config
;
568 Adjustment _dpi_adjustment
;
572 class BufferingOptions
: public OptionEditorBox
575 BufferingOptions (RCConfiguration
* c
)
577 , _playback_adjustment (5, 1, 60, 1, 4)
578 , _capture_adjustment (5, 1, 60, 1, 4)
579 , _playback_slider (_playback_adjustment
)
580 , _capture_slider (_capture_adjustment
)
582 _playback_adjustment
.set_value (_rc_config
->get_audio_playback_buffer_seconds());
584 Label
* l
= manage (new Label (_("Playback (seconds of buffering):")));
585 l
->set_name ("OptionsLabel");
587 _playback_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
588 HBox
* h
= manage (new HBox
);
590 h
->pack_start (*l
, false, false);
591 h
->pack_start (_playback_slider
, true, true);
593 _box
->pack_start (*h
, false, false);
595 _capture_adjustment
.set_value (_rc_config
->get_audio_capture_buffer_seconds());
597 l
= manage (new Label (_("Recording (seconds of buffering):")));
598 l
->set_name ("OptionsLabel");
600 _capture_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
601 h
= manage (new HBox
);
603 h
->pack_start (*l
, false, false);
604 h
->pack_start (_capture_slider
, true, true);
606 _box
->pack_start (*h
, false, false);
608 _capture_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::capture_changed
));
609 _playback_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::playback_changed
));
612 void parameter_changed (string
const & p
)
614 if (p
== "playback-buffer-seconds") {
615 _playback_adjustment
.set_value (_rc_config
->get_audio_playback_buffer_seconds());
616 } else if (p
== "capture-buffer-seconds") {
617 _capture_adjustment
.set_value (_rc_config
->get_audio_capture_buffer_seconds());
621 void set_state_from_config ()
623 parameter_changed ("playback-buffer-seconds");
624 parameter_changed ("capture-buffer-seconds");
629 void playback_changed ()
631 _rc_config
->set_audio_playback_buffer_seconds ((long) _playback_adjustment
.get_value());
634 void capture_changed ()
636 _rc_config
->set_audio_capture_buffer_seconds ((long) _capture_adjustment
.get_value());
639 RCConfiguration
* _rc_config
;
640 Adjustment _playback_adjustment
;
641 Adjustment _capture_adjustment
;
642 HScale _playback_slider
;
643 HScale _capture_slider
;
646 class ControlSurfacesOptions
: public OptionEditorBox
649 ControlSurfacesOptions (ArdourDialog
& parent
)
652 _store
= ListStore::create (_model
);
653 _view
.set_model (_store
);
654 _view
.append_column (_("Name"), _model
.name
);
655 _view
.get_column(0)->set_resizable (true);
656 _view
.get_column(0)->set_expand (true);
657 _view
.append_column_editable (_("Enabled"), _model
.enabled
);
658 _view
.append_column_editable (_("Feedback"), _model
.feedback
);
660 _box
->pack_start (_view
, false, false);
662 Label
* label
= manage (new Label
);
663 label
->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
665 _box
->pack_start (*label
, false, false);
668 _store
->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::model_changed
));
669 _view
.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked
));
672 void parameter_changed (std::string
const &)
677 void set_state_from_config ()
681 ControlProtocolManager
& m
= ControlProtocolManager::instance ();
682 for (list
<ControlProtocolInfo
*>::iterator i
= m
.control_protocol_info
.begin(); i
!= m
.control_protocol_info
.end(); ++i
) {
684 if (!(*i
)->mandatory
) {
685 TreeModel::Row r
= *_store
->append ();
686 r
[_model
.name
] = (*i
)->name
;
687 r
[_model
.enabled
] = ((*i
)->protocol
|| (*i
)->requested
);
688 r
[_model
.feedback
] = ((*i
)->protocol
&& (*i
)->protocol
->get_feedback ());
689 r
[_model
.protocol_info
] = *i
;
696 void model_changed (TreeModel::Path
const &, TreeModel::iterator
const & i
)
698 TreeModel::Row r
= *i
;
700 ControlProtocolInfo
* cpi
= r
[_model
.protocol_info
];
705 bool const was_enabled
= (cpi
->protocol
!= 0);
706 bool const is_enabled
= r
[_model
.enabled
];
708 if (was_enabled
!= is_enabled
) {
710 ControlProtocolManager::instance().instantiate (*cpi
);
712 ControlProtocolManager::instance().teardown (*cpi
);
716 bool const was_feedback
= (cpi
->protocol
&& cpi
->protocol
->get_feedback ());
717 bool const is_feedback
= r
[_model
.feedback
];
719 if (was_feedback
!= is_feedback
&& cpi
->protocol
) {
720 cpi
->protocol
->set_feedback (is_feedback
);
724 void edit_clicked (GdkEventButton
* ev
)
726 if (ev
->type
!= GDK_2BUTTON_PRESS
) {
731 ControlProtocolInfo
* cpi
;
734 row
= *(_view
.get_selection()->get_selected());
736 Window
* win
= row
[_model
.editor
];
737 if (win
&& !win
->is_visible()) {
740 cpi
= row
[_model
.protocol_info
];
742 if (cpi
&& cpi
->protocol
&& cpi
->protocol
->has_editor ()) {
743 Box
* box
= (Box
*) cpi
->protocol
->get_gui ();
745 string title
= row
[_model
.name
];
746 ArdourDialog
* win
= new ArdourDialog (_parent
, title
);
747 win
->get_vbox()->pack_start (*box
, false, false);
750 row
[_model
.editor
] = win
;
756 class ControlSurfacesModelColumns
: public TreeModelColumnRecord
760 ControlSurfacesModelColumns ()
769 TreeModelColumn
<string
> name
;
770 TreeModelColumn
<bool> enabled
;
771 TreeModelColumn
<bool> feedback
;
772 TreeModelColumn
<ControlProtocolInfo
*> protocol_info
;
773 TreeModelColumn
<Gtk::Window
*> editor
;
776 Glib::RefPtr
<ListStore
> _store
;
777 ControlSurfacesModelColumns _model
;
779 Gtk::Window
& _parent
;
783 RCOptionEditor::RCOptionEditor ()
784 : OptionEditor (Config
, string_compose (_("%1 Preferences"), PROGRAM_NAME
))
785 , _rc_config (Config
)
789 uint32_t hwcpus
= hardware_concurrency ();
792 add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization")));
794 ComboOption
<int32_t>* procs
= new ComboOption
<int32_t> (
796 _("Signal processing uses"),
797 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_processor_usage
),
798 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_processor_usage
)
801 procs
->add (-1, _("all but one processor"));
802 procs
->add (0, _("all available processors"));
804 for (uint32_t i
= 1; i
<= hwcpus
; ++i
) {
805 procs
->add (i
, string_compose (_("%1 processors"), i
));
808 add_option (_("Misc"), procs
);
811 add_option (_("Misc"), new OptionEditorHeading (_("Metering")));
813 ComboOption
<float>* mht
= new ComboOption
<float> (
815 _("Meter hold time"),
816 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_meter_hold
),
817 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_meter_hold
)
820 mht
->add (MeterHoldOff
, _("off"));
821 mht
->add (MeterHoldShort
, _("short"));
822 mht
->add (MeterHoldMedium
, _("medium"));
823 mht
->add (MeterHoldLong
, _("long"));
825 add_option (_("Misc"), mht
);
827 ComboOption
<float>* mfo
= new ComboOption
<float> (
830 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_meter_falloff
),
831 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_meter_falloff
)
834 mfo
->add (METER_FALLOFF_OFF
, _("off"));
835 mfo
->add (METER_FALLOFF_SLOWEST
, _("slowest"));
836 mfo
->add (METER_FALLOFF_SLOW
, _("slow"));
837 mfo
->add (METER_FALLOFF_MEDIUM
, _("medium"));
838 mfo
->add (METER_FALLOFF_FAST
, _("fast"));
839 mfo
->add (METER_FALLOFF_FASTER
, _("faster"));
840 mfo
->add (METER_FALLOFF_FASTEST
, _("fastest"));
842 add_option (_("Misc"), mfo
);
844 add_option (_("Misc"), new OptionEditorHeading (_("Undo")));
846 add_option (_("Misc"), new UndoOptions (_rc_config
));
848 add_option (_("Misc"), new OptionEditorHeading (_("Misc")));
851 /* font scaling does nothing with GDK/Quartz */
852 add_option (_("Misc"), new FontScalingOptions (_rc_config
));
855 add_option (_("Misc"),
857 "verify-remove-last-capture",
858 _("Verify removal of last capture"),
859 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_verify_remove_last_capture
),
860 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_verify_remove_last_capture
)
863 add_option (_("Misc"),
865 "periodic-safety-backups",
866 _("Make periodic backups of the session file"),
867 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_periodic_safety_backups
),
868 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_periodic_safety_backups
)
871 add_option (_("Misc"),
873 "sync-all-route-ordering",
874 _("Synchronise editor and mixer track order"),
875 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_sync_all_route_ordering
),
876 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_sync_all_route_ordering
)
879 add_option (_("Misc"),
881 "only-copy-imported-files",
882 _("Always copy imported files"),
883 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_only_copy_imported_files
),
884 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_only_copy_imported_files
)
887 add_option (_("Misc"),
890 _("Use narrow mixer strips"),
891 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_default_narrow_ms
),
892 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_default_narrow_ms
)
895 add_option (_("Misc"),
898 _("Name new markers"),
899 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_name_new_markers
),
900 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_name_new_markers
)
903 add_option (_("Misc"), new OptionEditorHeading (_("Click")));
905 add_option (_("Misc"), new ClickOptions (_rc_config
, this));
909 add_option (_("Transport"),
911 "latched-record-enable",
912 _("Keep record-enable engaged on stop"),
913 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_latched_record_enable
),
914 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_latched_record_enable
)
917 add_option (_("Transport"),
919 "stop-recording-on-xrun",
920 _("Stop recording when an xrun occurs"),
921 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_stop_recording_on_xrun
),
922 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_stop_recording_on_xrun
)
925 add_option (_("Transport"),
927 "create-xrun-marker",
928 _("Create markers where xruns occur"),
929 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_create_xrun_marker
),
930 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_create_xrun_marker
)
933 add_option (_("Transport"),
935 "stop-at-session-end",
936 _("Stop at the end of the session"),
937 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_stop_at_session_end
),
938 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_stop_at_session_end
)
941 add_option (_("Transport"),
944 _("Do seamless looping (not possible when slaved to MTC, JACK etc)"),
945 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_seamless_loop
),
946 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_seamless_loop
)
949 add_option (_("Transport"),
951 "primary-clock-delta-edit-cursor",
952 _("Primary clock delta to edit cursor"),
953 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_primary_clock_delta_edit_cursor
),
954 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_primary_clock_delta_edit_cursor
)
957 add_option (_("Transport"),
959 "secondary-clock-delta-edit-cursor",
960 _("Secondary clock delta to edit cursor"),
961 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_secondary_clock_delta_edit_cursor
),
962 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_secondary_clock_delta_edit_cursor
)
965 add_option (_("Transport"),
967 "disable-disarm-during-roll",
968 _("Disable per-track record disarm while rolling"),
969 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_disable_disarm_during_roll
),
970 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_disable_disarm_during_roll
)
973 add_option (_("Transport"),
976 _("12dB gain reduction during fast-forward and fast-rewind"),
977 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_quieten_at_speed
),
978 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_quieten_at_speed
)
983 add_option (_("Editor"),
985 "link-region-and-track-selection",
986 _("Link selection of regions and tracks"),
987 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_link_region_and_track_selection
),
988 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_link_region_and_track_selection
)
991 add_option (_("Editor"),
993 "automation-follows-regions",
994 _("Move relevant automation when audio regions are moved"),
995 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_automation_follows_regions
),
996 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_automation_follows_regions
)
999 add_option (_("Editor"),
1001 "show-track-meters",
1002 _("Show meters on tracks in the editor"),
1003 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_track_meters
),
1004 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_track_meters
)
1007 add_option (_("Editor"),
1009 "use-overlap-equivalency",
1010 _("Use overlap equivalency for regions"),
1011 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_use_overlap_equivalency
),
1012 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_use_overlap_equivalency
)
1015 add_option (_("Editor"),
1017 "rubberbanding-snaps-to-grid",
1018 _("Make rubberband selection rectangle snap to the grid"),
1019 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_rubberbanding_snaps_to_grid
),
1020 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_rubberbanding_snaps_to_grid
)
1023 add_option (_("Editor"),
1026 _("Show waveforms in regions"),
1027 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_waveforms
),
1028 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_waveforms
)
1031 ComboOption
<WaveformScale
>* wfs
= new ComboOption
<WaveformScale
> (
1033 _("Waveform scale"),
1034 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_waveform_scale
),
1035 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_waveform_scale
)
1038 wfs
->add (Linear
, _("linear"));
1039 wfs
->add (Logarithmic
, _("logarithmic"));
1041 add_option (_("Editor"), wfs
);
1043 ComboOption
<WaveformShape
>* wfsh
= new ComboOption
<WaveformShape
> (
1045 _("Waveform shape"),
1046 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_waveform_shape
),
1047 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_waveform_shape
)
1050 wfsh
->add (Traditional
, _("traditional"));
1051 wfsh
->add (Rectified
, _("rectified"));
1053 add_option (_("Editor"), wfsh
);
1055 add_option (_("Editor"),
1057 "show-waveforms-while-recording",
1058 _("Show waveforms for audio while it is being recorded"),
1059 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_waveforms_while_recording
),
1060 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_waveforms_while_recording
)
1063 add_option (_("Editor"),
1066 _("Show zoom toolbar"),
1067 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_zoom_tools
),
1068 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_zoom_tools
)
1071 add_option (_("Editor"),
1073 "color-regions-using-track-color",
1074 _("Color regions using their track's color"),
1075 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_color_regions_using_track_color
),
1076 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_color_regions_using_track_color
)
1081 add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
1083 add_option (_("Audio"), new BufferingOptions (_rc_config
));
1085 add_option (_("Audio"), new OptionEditorHeading (_("Monitoring")));
1087 add_option (_("Audio"),
1090 _("Use a monitor bus (allows AFL/PFL and more control)"),
1091 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_use_monitor_bus
),
1092 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_use_monitor_bus
)
1095 ComboOption
<MonitorModel
>* mm
= new ComboOption
<MonitorModel
> (
1097 _("Record monitoring handled by"),
1098 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_monitoring_model
),
1099 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_monitoring_model
)
1103 /* no JACK monitoring on CoreAudio */
1104 if (AudioEngine::instance()->can_request_hardware_monitoring()) {
1105 mm
->add (HardwareMonitoring
, _("JACK"));
1108 mm
->add (SoftwareMonitoring
, _("ardour"));
1109 mm
->add (ExternalMonitoring
, _("audio hardware"));
1111 add_option (_("Audio"), mm
);
1113 ComboOption
<PFLPosition
>* pp
= new ComboOption
<PFLPosition
> (
1115 _("PFL signals come from"),
1116 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_pfl_position
),
1117 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_pfl_position
)
1120 pp
->add (PFLFromBeforeProcessors
, _("before pre-fader processors"));
1121 pp
->add (PFLFromAfterProcessors
, _("pre-fader but after pre-fader processors"));
1123 add_option (_("Audio"), pp
);
1125 ComboOption
<AFLPosition
>* pa
= new ComboOption
<AFLPosition
> (
1127 _("AFL signals come from"),
1128 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_afl_position
),
1129 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_afl_position
)
1132 pa
->add (AFLFromBeforeProcessors
, _("post-fader but before post-fader processors"));
1133 pa
->add (AFLFromAfterProcessors
, _("after post-fader processors"));
1135 add_option (_("Audio"), pa
);
1137 add_option (_("Audio"),
1139 "tape-machine-mode",
1140 _("Tape machine mode"),
1141 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_tape_machine_mode
),
1142 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_tape_machine_mode
)
1145 add_option (_("Audio"), new OptionEditorHeading (_("Connection of tracks and busses")));
1147 add_option (_("Audio"),
1149 "auto-connect-standard-busses",
1150 _("Auto-connect master/monitor busses"),
1151 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_auto_connect_standard_busses
),
1152 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_auto_connect_standard_busses
)
1155 ComboOption
<AutoConnectOption
>* iac
= new ComboOption
<AutoConnectOption
> (
1156 "input-auto-connect",
1157 _("Connect track inputs"),
1158 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_input_auto_connect
),
1159 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_input_auto_connect
)
1162 iac
->add (AutoConnectPhysical
, _("automatically to physical inputs"));
1163 iac
->add (ManualConnect
, _("manually"));
1165 add_option (_("Audio"), iac
);
1167 ComboOption
<AutoConnectOption
>* oac
= new ComboOption
<AutoConnectOption
> (
1168 "output-auto-connect",
1169 _("Connect track and bus outputs"),
1170 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_output_auto_connect
),
1171 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_output_auto_connect
)
1174 oac
->add (AutoConnectPhysical
, _("automatically to physical outputs"));
1175 oac
->add (AutoConnectMaster
, _("automatically to master bus"));
1176 oac
->add (ManualConnect
, _("manually"));
1178 add_option (_("Audio"), oac
);
1180 add_option (_("Audio"), new OptionEditorHeading (_("Denormals")));
1182 add_option (_("Audio"),
1184 "denormal-protection",
1185 _("Use DC bias to protect against denormals"),
1186 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_denormal_protection
),
1187 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_denormal_protection
)
1190 ComboOption
<DenormalModel
>* dm
= new ComboOption
<DenormalModel
> (
1192 _("Processor handling"),
1193 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_denormal_model
),
1194 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_denormal_model
)
1197 dm
->add (DenormalNone
, _("no processor handling"));
1201 if (fpu
.has_flush_to_zero()) {
1202 dm
->add (DenormalFTZ
, _("use FlushToZero"));
1205 if (fpu
.has_denormals_are_zero()) {
1206 dm
->add (DenormalDAZ
, _("use DenormalsAreZero"));
1209 if (fpu
.has_flush_to_zero() && fpu
.has_denormals_are_zero()) {
1210 dm
->add (DenormalFTZDAZ
, _("use FlushToZero and DenormalsAreZerO"));
1213 add_option (_("Audio"), dm
);
1215 add_option (_("Audio"), new OptionEditorHeading (_("Plugins")));
1217 add_option (_("Audio"),
1219 "plugins-stop-with-transport",
1220 _("Stop plugins when the transport is stopped"),
1221 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_plugins_stop_with_transport
),
1222 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_plugins_stop_with_transport
)
1225 add_option (_("Audio"),
1227 "do-not-record-plugins",
1228 _("Disable plugins during recording"),
1229 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_do_not_record_plugins
),
1230 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_do_not_record_plugins
)
1233 add_option (_("Audio"),
1235 "new-plugins-active",
1236 _("Make new plugins active"),
1237 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_new_plugins_active
),
1238 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_new_plugins_active
)
1241 add_option (_("Audio"),
1243 "auto-analyse-audio",
1244 _("Enable automatic analysis of audio"),
1245 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_auto_analyse_audio
),
1246 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_auto_analyse_audio
)
1249 add_option (_("Audio"),
1251 "replicate-missing-region-channels",
1252 _("Replicate missing region channels"),
1253 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_replicate_missing_region_channels
),
1254 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_replicate_missing_region_channels
)
1259 add_option (_("Solo / mute"),
1262 _("Solo mute cut (dB)"),
1263 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_mute_gain
),
1264 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_mute_gain
)
1267 _solo_control_is_listen_control
= new BoolOption (
1268 "solo-control-is-listen-control",
1269 _("Solo controls are Listen controls"),
1270 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_control_is_listen_control
),
1271 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_control_is_listen_control
)
1274 add_option (_("Solo / mute"), _solo_control_is_listen_control
);
1276 _listen_position
= new ComboOption
<ListenPosition
> (
1278 _("Listen Position"),
1279 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_listen_position
),
1280 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_listen_position
)
1283 _listen_position
->add (AfterFaderListen
, _("after-fader listen"));
1284 _listen_position
->add (PreFaderListen
, _("pre-fader listen"));
1286 add_option (_("Solo / mute"), _listen_position
);
1288 parameter_changed ("use-monitor-bus");
1290 add_option (_("Solo / mute"),
1293 _("Exclusive solo"),
1294 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_exclusive_solo
),
1295 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_exclusive_solo
)
1298 add_option (_("Solo / mute"),
1301 _("Show solo muting"),
1302 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_solo_mutes
),
1303 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_solo_mutes
)
1306 add_option (_("Solo / mute"),
1308 "solo-mute-override",
1309 _("Soloing overrides muting"),
1310 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_mute_override
),
1311 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_mute_override
)
1314 add_option (_("Solo / mute"), new OptionEditorHeading (_("Default track / bus muting options")));
1316 add_option (_("Solo / mute"),
1318 "mute-affects-pre-fader",
1319 _("Mute affects pre-fader sends"),
1320 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_pre_fader
),
1321 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_pre_fader
)
1324 add_option (_("Solo / mute"),
1326 "mute-affects-post-fader",
1327 _("Mute affects post-fader sends"),
1328 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_post_fader
),
1329 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_post_fader
)
1332 add_option (_("Solo / mute"),
1334 "mute-affects-control-outs",
1335 _("Mute affects control outputs"),
1336 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_control_outs
),
1337 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_control_outs
)
1340 add_option (_("Solo / mute"),
1342 "mute-affects-main-outs",
1343 _("Mute affects main outputs"),
1344 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_main_outs
),
1345 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_main_outs
)
1348 add_option (_("MIDI control"),
1351 _("Send MIDI Clock"),
1352 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_midi_clock
),
1353 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_midi_clock
)
1356 add_option (_("MIDI control"),
1359 _("Send MIDI Time Code"),
1360 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_mtc
),
1361 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_mtc
)
1364 add_option (_("MIDI control"),
1365 new SpinOption
<int> (
1366 "mtc-qf-speed-tolerance",
1367 _("Percentage either side of normal transport speed to transmit MTC"),
1368 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mtc_qf_speed_tolerance
),
1369 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mtc_qf_speed_tolerance
),
1373 add_option (_("MIDI control"),
1376 _("Obey MIDI Machine Control commands"),
1377 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_control
),
1378 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_control
)
1381 add_option (_("MIDI control"),
1384 _("Send MIDI Machine Control commands"),
1385 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_mmc
),
1386 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_mmc
)
1389 add_option (_("MIDI control"),
1392 _("Send MIDI control feedback"),
1393 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_midi_feedback
),
1394 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_midi_feedback
)
1397 add_option (_("MIDI control"),
1398 new SpinOption
<uint8_t> (
1399 "mmc-receive-device-id",
1400 _("Inbound MMC device ID"),
1401 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_receive_device_id
),
1402 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_receive_device_id
),
1406 add_option (_("MIDI control"),
1407 new SpinOption
<uint8_t> (
1408 "mmc-send-device-id",
1409 _("Outbound MMC device ID"),
1410 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_send_device_id
),
1411 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_send_device_id
),
1415 add_option (_("MIDI control"),
1416 new SpinOption
<int32_t> (
1417 "initial-program-change",
1418 _("Initial program change"),
1419 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_initial_program_change
),
1420 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_initial_program_change
),
1424 /* CONTROL SURFACES */
1426 add_option (_("Control surfaces"), new ControlSurfacesOptions (*this));
1428 ComboOption
<RemoteModel
>* rm
= new ComboOption
<RemoteModel
> (
1430 _("Control surface remote ID"),
1431 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_remote_model
),
1432 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_remote_model
)
1435 rm
->add (UserOrdered
, _("assigned by user"));
1436 rm
->add (MixerOrdered
, _("follows order of mixer"));
1437 rm
->add (EditorOrdered
, _("follows order of editor"));
1439 add_option (_("Control surfaces"), rm
);
1443 add_option (_("Keyboard"), new KeyboardOptions
);
1447 RCOptionEditor::parameter_changed (string
const & p
)
1449 OptionEditor::parameter_changed (p
);
1451 if (p
== "use-monitor-bus") {
1452 bool const s
= Config
->get_use_monitor_bus ();
1454 /* we can't use this if we don't have a monitor bus */
1455 Config
->set_solo_control_is_listen_control (false);
1457 _solo_control_is_listen_control
->set_sensitive (s
);
1458 _listen_position
->set_sensitive (s
);