1 #include <gtkmm/liststore.h>
2 #include <gtkmm/stock.h>
3 #include <gtkmm/scale.h>
4 #include <gtkmm2ext/utils.h>
5 #include <gtkmm2ext/slider_controller.h>
9 #include "midi++/manager.h"
10 #include "midi++/factory.h"
12 #include "ardour/audioengine.h"
13 #include "ardour/dB.h"
14 #include "ardour/rc_configuration.h"
15 #include "ardour/control_protocol_manager.h"
16 #include "control_protocol/control_protocol.h"
18 #include "gui_thread.h"
19 #include "midi_tracer.h"
20 #include "rc_option_editor.h"
22 #include "midi_port_dialog.h"
29 using namespace Gtkmm2ext
;
31 using namespace ARDOUR
;
33 class MIDIPorts
: public OptionEditorBox
36 MIDIPorts (RCConfiguration
* c
, list
<ComboOption
<string
>* > const & o
)
38 _add_port_button (Stock::ADD
),
41 _store
= ListStore::create (_model
);
42 _view
.set_model (_store
);
43 _view
.append_column (_("Name"), _model
.name
);
44 _view
.get_column(0)->set_resizable (true);
45 _view
.get_column(0)->set_expand (true);
46 _view
.append_column_editable (_("Online"), _model
.online
);
47 _view
.append_column_editable (_("Trace input"), _model
.trace_input
);
48 _view
.append_column_editable (_("Trace output"), _model
.trace_output
);
50 HBox
* h
= manage (new HBox
);
52 h
->pack_start (_view
, true, true);
54 VBox
* v
= manage (new VBox
);
56 v
->pack_start (_add_port_button
, false, false);
57 h
->pack_start (*v
, false, false);
59 _box
->pack_start (*h
);
63 _store
->signal_row_changed().connect (sigc::mem_fun (*this, &MIDIPorts::model_changed
));
65 _add_port_button
.signal_clicked().connect (sigc::mem_fun (*this, &MIDIPorts::add_port_clicked
));
68 void parameter_changed (string
const &) {}
69 void set_state_from_config () {}
73 typedef std::map
<MIDI::Port
*,MidiTracer
*> PortTraceMap
;
74 PortTraceMap port_input_trace_map
;
75 PortTraceMap port_output_trace_map
;
77 void model_changed (TreeModel::Path
const &, TreeModel::iterator
const & i
)
79 TreeModel::Row r
= *i
;
81 MIDI::Port
* port
= r
[_model
.port
];
88 if (r
[_model
.online
] == port
->input()->offline()) {
89 port
->input()->set_offline (!r
[_model
.online
]);
92 if (r
[_model
.trace_input
] != port
->input()->tracing()) {
93 PortTraceMap::iterator x
= port_input_trace_map
.find (port
);
96 if (x
== port_input_trace_map
.end()) {
97 mt
= new MidiTracer (port
->name() + string (" [input]"), *port
->input());
98 port_input_trace_map
.insert (pair
<MIDI::Port
*,MidiTracer
*> (port
, mt
));
106 if (port
->output()) {
108 if (r
[_model
.trace_output
] != port
->output()->tracing()) {
109 PortTraceMap::iterator x
= port_output_trace_map
.find (port
);
112 if (x
== port_output_trace_map
.end()) {
113 mt
= new MidiTracer (port
->name() + string (" [output]"), *port
->output());
114 port_output_trace_map
.insert (pair
<MIDI::Port
*,MidiTracer
*> (port
, mt
));
124 void setup_ports_combo (ComboOption
<string
>* c
)
127 MIDI::Manager::PortList
const & ports
= MIDI::Manager::instance()->get_midi_ports ();
128 for (MIDI::Manager::PortList::const_iterator i
= ports
.begin(); i
!= ports
.end(); ++i
) {
129 c
->add ((*i
)->name(), (*i
)->name());
133 void ports_changed ()
135 /* XXX: why is this coming from here? */
136 MIDI::Manager::PortList
const & ports
= MIDI::Manager::instance()->get_midi_ports ();
139 port_connections
.drop_connections ();
141 for (MIDI::Manager::PortList::const_iterator i
= ports
.begin(); i
!= ports
.end(); ++i
) {
143 TreeModel::Row r
= *_store
->append ();
145 r
[_model
.name
] = (*i
)->name();
148 r
[_model
.online
] = !(*i
)->input()->offline();
149 (*i
)->input()->OfflineStatusChanged
.connect (port_connections
, MISSING_INVALIDATOR
, boost::bind (&MIDIPorts::port_offline_changed
, this, (*i
)), gui_context());
150 r
[_model
.trace_input
] = (*i
)->input()->tracing();
153 if ((*i
)->output()) {
154 r
[_model
.trace_output
] = (*i
)->output()->tracing();
157 r
[_model
.port
] = (*i
);
160 for (list
<ComboOption
<string
>* >::iterator i
= _port_combos
.begin(); i
!= _port_combos
.end(); ++i
) {
161 setup_ports_combo (*i
);
165 void port_offline_changed (MIDI::Port
* p
)
171 for (TreeModel::Children::iterator i
= _store
->children().begin(); i
!= _store
->children().end(); ++i
) {
172 if ((*i
)[_model
.port
] == p
) {
173 (*i
)[_model
.online
] = !p
->input()->offline();
178 void add_port_clicked ()
180 MidiPortDialog dialog
;
182 dialog
.set_position (WIN_POS_MOUSE
);
186 int const r
= dialog
.run ();
189 case RESPONSE_ACCEPT
:
196 Glib::ustring
const mode
= dialog
.port_mode_combo
.get_active_text ();
199 if (mode
== _("input")) {
201 } else if (mode
== (_("output"))) {
207 XMLNode
node (X_("MIDI-port"));
209 node
.add_property ("tag", dialog
.port_name
.get_text());
210 node
.add_property ("device", X_("ardour")); // XXX this can't be right for all types
211 node
.add_property ("type", MIDI::PortFactory::default_port_type());
212 node
.add_property ("mode", smod
);
214 if (MIDI::Manager::instance()->add_port (node
) != 0) {
215 cerr
<< " there are now " << MIDI::Manager::instance()->nports() << endl
;
220 class MIDIModelColumns
: public TreeModelColumnRecord
232 TreeModelColumn
<string
> name
;
233 TreeModelColumn
<bool> online
;
234 TreeModelColumn
<bool> trace_input
;
235 TreeModelColumn
<bool> trace_output
;
236 TreeModelColumn
<MIDI::Port
*> port
;
239 RCConfiguration
* _rc_config
;
240 Glib::RefPtr
<ListStore
> _store
;
241 MIDIModelColumns _model
;
243 Button _add_port_button
;
244 ComboBoxText _mtc_combo
;
245 ComboBoxText _midi_clock_combo
;
246 ComboBoxText _mmc_combo
;
247 ComboBoxText _mpc_combo
;
248 list
<ComboOption
<string
>* > _port_combos
;
249 PBD::ScopedConnectionList port_connections
;
253 class ClickOptions
: public OptionEditorBox
256 ClickOptions (RCConfiguration
* c
, ArdourDialog
* p
)
260 Table
* t
= manage (new Table (2, 3));
263 Label
* l
= manage (new Label (_("Click audio file:")));
264 l
->set_alignment (0, 0.5);
265 t
->attach (*l
, 0, 1, 0, 1, FILL
);
266 t
->attach (_click_path_entry
, 1, 2, 0, 1, FILL
);
267 Button
* b
= manage (new Button (_("Browse...")));
268 b
->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_browse_clicked
));
269 t
->attach (*b
, 2, 3, 0, 1, FILL
);
271 l
= manage (new Label (_("Click emphasis audio file:")));
272 l
->set_alignment (0, 0.5);
273 t
->attach (*l
, 0, 1, 1, 2, FILL
);
274 t
->attach (_click_emphasis_path_entry
, 1, 2, 1, 2, FILL
);
275 b
= manage (new Button (_("Browse...")));
276 b
->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked
));
277 t
->attach (*b
, 2, 3, 1, 2, FILL
);
279 _box
->pack_start (*t
, false, false);
282 void parameter_changed (string
const & p
)
284 if (p
== "click-sound") {
285 _click_path_entry
.set_text (_rc_config
->get_click_sound());
286 } else if (p
== "click-emphasis-sound") {
287 _click_emphasis_path_entry
.set_text (_rc_config
->get_click_emphasis_sound());
291 void set_state_from_config ()
293 parameter_changed ("click-sound");
294 parameter_changed ("click-emphasis-sound");
299 void click_browse_clicked ()
301 SoundFileChooser
sfdb (*_parent
, _("Choose Click"));
306 if (sfdb
.run () == RESPONSE_OK
) {
307 click_chosen (sfdb
.get_filename());
311 void click_chosen (string
const & path
)
313 _click_path_entry
.set_text (path
);
314 _rc_config
->set_click_sound (path
);
317 void click_emphasis_browse_clicked ()
319 SoundFileChooser
sfdb (*_parent
, _("Choose Click Emphasis"));
324 if (sfdb
.run () == RESPONSE_OK
) {
325 click_emphasis_chosen (sfdb
.get_filename());
329 void click_emphasis_chosen (string
const & path
)
331 _click_emphasis_path_entry
.set_text (path
);
332 _rc_config
->set_click_emphasis_sound (path
);
335 RCConfiguration
* _rc_config
;
336 ArdourDialog
* _parent
;
337 Entry _click_path_entry
;
338 Entry _click_emphasis_path_entry
;
341 class UndoOptions
: public OptionEditorBox
344 UndoOptions (RCConfiguration
* c
) :
346 _limit_undo_button (_("Limit undo history to")),
347 _save_undo_button (_("Save undo history of"))
349 Table
* t
= new Table (2, 3);
352 t
->attach (_limit_undo_button
, 0, 1, 0, 1, FILL
);
353 _limit_undo_spin
.set_range (0, 512);
354 _limit_undo_spin
.set_increments (1, 10);
355 t
->attach (_limit_undo_spin
, 1, 2, 0, 1, FILL
| EXPAND
);
356 Label
* l
= manage (new Label (_("commands")));
357 l
->set_alignment (0, 0.5);
358 t
->attach (*l
, 2, 3, 0, 1);
360 t
->attach (_save_undo_button
, 0, 1, 1, 2, FILL
);
361 _save_undo_spin
.set_range (0, 512);
362 _save_undo_spin
.set_increments (1, 10);
363 t
->attach (_save_undo_spin
, 1, 2, 1, 2, FILL
| EXPAND
);
364 l
= manage (new Label (_("commands")));
365 l
->set_alignment (0, 0.5);
366 t
->attach (*l
, 2, 3, 1, 2);
368 _box
->pack_start (*t
);
370 _limit_undo_button
.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_toggled
));
371 _limit_undo_spin
.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_changed
));
372 _save_undo_button
.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_toggled
));
373 _save_undo_spin
.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_changed
));
376 void parameter_changed (string
const & p
)
378 if (p
== "history-depth") {
379 int32_t const d
= _rc_config
->get_history_depth();
380 _limit_undo_button
.set_active (d
!= 0);
381 _limit_undo_spin
.set_sensitive (d
!= 0);
382 _limit_undo_spin
.set_value (d
);
383 } else if (p
== "save-history") {
384 bool const x
= _rc_config
->get_save_history ();
385 _save_undo_button
.set_active (x
);
386 _save_undo_spin
.set_sensitive (x
);
387 } else if (p
== "save-history-depth") {
388 _save_undo_spin
.set_value (_rc_config
->get_saved_history_depth());
392 void set_state_from_config ()
394 parameter_changed ("save-history");
395 parameter_changed ("history-depth");
396 parameter_changed ("save-history-depth");
399 void limit_undo_toggled ()
401 bool const x
= _limit_undo_button
.get_active ();
402 _limit_undo_spin
.set_sensitive (x
);
403 int32_t const n
= x
? 16 : 0;
404 _limit_undo_spin
.set_value (n
);
405 _rc_config
->set_history_depth (n
);
408 void limit_undo_changed ()
410 _rc_config
->set_history_depth (_limit_undo_spin
.get_value_as_int ());
413 void save_undo_toggled ()
415 bool const x
= _save_undo_button
.get_active ();
416 _rc_config
->set_save_history (x
);
419 void save_undo_changed ()
421 _rc_config
->set_saved_history_depth (_save_undo_spin
.get_value_as_int ());
425 RCConfiguration
* _rc_config
;
426 CheckButton _limit_undo_button
;
427 SpinButton _limit_undo_spin
;
428 CheckButton _save_undo_button
;
429 SpinButton _save_undo_spin
;
434 static const struct {
446 { "Shift", GDK_SHIFT_MASK
},
447 { "Command", GDK_META_MASK
},
448 { "Control", GDK_CONTROL_MASK
},
449 { "Option", GDK_MOD1_MASK
},
450 { "Command-Shift", GDK_META_MASK
|GDK_SHIFT_MASK
},
451 { "Command-Option", GDK_MOD1_MASK
|GDK_META_MASK
},
452 { "Shift-Option", GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
453 { "Shift-Command-Option", GDK_MOD5_MASK
|GDK_SHIFT_MASK
|GDK_META_MASK
},
456 { "Shift", GDK_SHIFT_MASK
},
457 { "Control", GDK_CONTROL_MASK
},
458 { "Alt (Mod1)", GDK_MOD1_MASK
},
459 { "Control-Shift", GDK_CONTROL_MASK
|GDK_SHIFT_MASK
},
460 { "Control-Alt", GDK_CONTROL_MASK
|GDK_MOD1_MASK
},
461 { "Shift-Alt", GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
462 { "Control-Shift-Alt", GDK_CONTROL_MASK
|GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
463 { "Mod2", GDK_MOD2_MASK
},
464 { "Mod3", GDK_MOD3_MASK
},
465 { "Mod4", GDK_MOD4_MASK
},
466 { "Mod5", GDK_MOD5_MASK
},
472 class KeyboardOptions
: public OptionEditorBox
476 _delete_button_adjustment (3, 1, 12),
477 _delete_button_spin (_delete_button_adjustment
),
478 _edit_button_adjustment (3, 1, 5),
479 _edit_button_spin (_edit_button_adjustment
)
482 /* internationalize and prepare for use with combos */
485 for (int i
= 0; modifiers
[i
].name
; ++i
) {
486 dumb
.push_back (_(modifiers
[i
].name
));
489 set_popdown_strings (_edit_modifier_combo
, dumb
);
490 _edit_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_modifier_chosen
));
492 for (int x
= 0; modifiers
[x
].name
; ++x
) {
493 if (modifiers
[x
].modifier
== Keyboard::edit_modifier ()) {
494 _edit_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
499 Table
* t
= manage (new Table (4, 4));
502 Label
* l
= manage (new Label (_("Edit using:")));
503 l
->set_name ("OptionsLabel");
504 l
->set_alignment (0, 0.5);
506 t
->attach (*l
, 0, 1, 0, 1, FILL
| EXPAND
, FILL
);
507 t
->attach (_edit_modifier_combo
, 1, 2, 0, 1, FILL
| EXPAND
, FILL
);
509 l
= manage (new Label (_("+ button")));
510 l
->set_name ("OptionsLabel");
512 t
->attach (*l
, 3, 4, 0, 1, FILL
| EXPAND
, FILL
);
513 t
->attach (_edit_button_spin
, 4, 5, 0, 1, FILL
| EXPAND
, FILL
);
515 _edit_button_spin
.set_name ("OptionsEntry");
516 _edit_button_adjustment
.set_value (Keyboard::edit_button());
517 _edit_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_button_changed
));
519 set_popdown_strings (_delete_modifier_combo
, dumb
);
520 _delete_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_modifier_chosen
));
522 for (int x
= 0; modifiers
[x
].name
; ++x
) {
523 if (modifiers
[x
].modifier
== Keyboard::delete_modifier ()) {
524 _delete_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
529 l
= manage (new Label (_("Delete using:")));
530 l
->set_name ("OptionsLabel");
531 l
->set_alignment (0, 0.5);
533 t
->attach (*l
, 0, 1, 1, 2, FILL
| EXPAND
, FILL
);
534 t
->attach (_delete_modifier_combo
, 1, 2, 1, 2, FILL
| EXPAND
, FILL
);
536 l
= manage (new Label (_("+ button")));
537 l
->set_name ("OptionsLabel");
539 t
->attach (*l
, 3, 4, 1, 2, FILL
| EXPAND
, FILL
);
540 t
->attach (_delete_button_spin
, 4, 5, 1, 2, FILL
| EXPAND
, FILL
);
542 _delete_button_spin
.set_name ("OptionsEntry");
543 _delete_button_adjustment
.set_value (Keyboard::delete_button());
544 _delete_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed
));
546 set_popdown_strings (_snap_modifier_combo
, dumb
);
547 _snap_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen
));
549 for (int x
= 0; modifiers
[x
].name
; ++x
) {
550 if (modifiers
[x
].modifier
== (guint
) Keyboard::snap_modifier ()) {
551 _snap_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
556 l
= manage (new Label (_("Toggle snap using:")));
557 l
->set_name ("OptionsLabel");
558 l
->set_alignment (0, 0.5);
560 t
->attach (*l
, 0, 1, 2, 3, FILL
| EXPAND
, FILL
);
561 t
->attach (_snap_modifier_combo
, 1, 2, 2, 3, FILL
| EXPAND
, FILL
);
565 for (map
<string
,string
>::iterator bf
= Keyboard::binding_files
.begin(); bf
!= Keyboard::binding_files
.end(); ++bf
) {
566 strs
.push_back (bf
->first
);
569 set_popdown_strings (_keyboard_layout_selector
, strs
);
570 _keyboard_layout_selector
.set_active_text (Keyboard::current_binding_name());
571 _keyboard_layout_selector
.signal_changed().connect (sigc::mem_fun (*this, &KeyboardOptions::bindings_changed
));
573 l
= manage (new Label (_("Keyboard layout:")));
574 l
->set_name ("OptionsLabel");
575 l
->set_alignment (0, 0.5);
577 t
->attach (*l
, 0, 1, 3, 4, FILL
| EXPAND
, FILL
);
578 t
->attach (_keyboard_layout_selector
, 1, 2, 3, 4, FILL
| EXPAND
, FILL
);
580 _box
->pack_start (*t
, false, false);
583 void parameter_changed (string
const &)
585 /* XXX: these aren't really config options... */
588 void set_state_from_config ()
590 /* XXX: these aren't really config options... */
595 void bindings_changed ()
597 string
const txt
= _keyboard_layout_selector
.get_active_text();
599 /* XXX: config...? for all this keyboard stuff */
601 for (map
<string
,string
>::iterator i
= Keyboard::binding_files
.begin(); i
!= Keyboard::binding_files
.end(); ++i
) {
602 if (txt
== i
->first
) {
603 if (Keyboard::load_keybindings (i
->second
)) {
604 Keyboard::save_keybindings ();
610 void edit_modifier_chosen ()
612 string
const txt
= _edit_modifier_combo
.get_active_text();
614 for (int i
= 0; modifiers
[i
].name
; ++i
) {
615 if (txt
== _(modifiers
[i
].name
)) {
616 Keyboard::set_edit_modifier (modifiers
[i
].modifier
);
622 void delete_modifier_chosen ()
624 string
const txt
= _delete_modifier_combo
.get_active_text();
626 for (int i
= 0; modifiers
[i
].name
; ++i
) {
627 if (txt
== _(modifiers
[i
].name
)) {
628 Keyboard::set_delete_modifier (modifiers
[i
].modifier
);
634 void snap_modifier_chosen ()
636 string
const txt
= _snap_modifier_combo
.get_active_text();
638 for (int i
= 0; modifiers
[i
].name
; ++i
) {
639 if (txt
== _(modifiers
[i
].name
)) {
640 Keyboard::set_snap_modifier (modifiers
[i
].modifier
);
646 void delete_button_changed ()
648 Keyboard::set_delete_button (_delete_button_spin
.get_value_as_int());
651 void edit_button_changed ()
653 Keyboard::set_edit_button (_edit_button_spin
.get_value_as_int());
656 ComboBoxText _keyboard_layout_selector
;
657 ComboBoxText _edit_modifier_combo
;
658 ComboBoxText _delete_modifier_combo
;
659 ComboBoxText _snap_modifier_combo
;
660 Adjustment _delete_button_adjustment
;
661 SpinButton _delete_button_spin
;
662 Adjustment _edit_button_adjustment
;
663 SpinButton _edit_button_spin
;
666 class FontScalingOptions
: public OptionEditorBox
669 FontScalingOptions (RCConfiguration
* c
) :
671 _dpi_adjustment (50, 50, 250, 1, 10),
672 _dpi_slider (_dpi_adjustment
)
674 _dpi_adjustment
.set_value (_rc_config
->get_font_scale () / 1024);
676 Label
* l
= manage (new Label (_("Font scaling:")));
677 l
->set_name ("OptionsLabel");
679 _dpi_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
680 HBox
* h
= manage (new HBox
);
682 h
->pack_start (*l
, false, false);
683 h
->pack_start (_dpi_slider
, true, true);
685 _box
->pack_start (*h
, false, false);
687 _dpi_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &FontScalingOptions::dpi_changed
));
690 void parameter_changed (string
const & p
)
692 if (p
== "font-scale") {
693 _dpi_adjustment
.set_value (_rc_config
->get_font_scale() / 1024);
697 void set_state_from_config ()
699 parameter_changed ("font-scale");
706 _rc_config
->set_font_scale ((long) floor (_dpi_adjustment
.get_value() * 1024));
707 /* XXX: should be triggered from the parameter changed signal */
711 RCConfiguration
* _rc_config
;
712 Adjustment _dpi_adjustment
;
716 class ControlSurfacesOptions
: public OptionEditorBox
719 ControlSurfacesOptions (ArdourDialog
& parent
)
722 _store
= ListStore::create (_model
);
723 _view
.set_model (_store
);
724 _view
.append_column (_("Name"), _model
.name
);
725 _view
.get_column(0)->set_resizable (true);
726 _view
.get_column(0)->set_expand (true);
727 _view
.append_column_editable (_("Enabled"), _model
.enabled
);
728 _view
.append_column_editable (_("Feedback"), _model
.feedback
);
730 _box
->pack_start (_view
, false, false);
732 Label
* label
= manage (new Label
);
733 label
->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
735 _box
->pack_start (*label
, false, false);
738 _store
->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::model_changed
));
739 _view
.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked
));
742 void parameter_changed (std::string
const &)
747 void set_state_from_config ()
751 ControlProtocolManager
& m
= ControlProtocolManager::instance ();
752 for (list
<ControlProtocolInfo
*>::iterator i
= m
.control_protocol_info
.begin(); i
!= m
.control_protocol_info
.end(); ++i
) {
754 if (!(*i
)->mandatory
) {
755 TreeModel::Row r
= *_store
->append ();
756 r
[_model
.name
] = (*i
)->name
;
757 r
[_model
.enabled
] = ((*i
)->protocol
|| (*i
)->requested
);
758 r
[_model
.feedback
] = ((*i
)->protocol
&& (*i
)->protocol
->get_feedback ());
759 r
[_model
.protocol_info
] = *i
;
766 void model_changed (TreeModel::Path
const &, TreeModel::iterator
const & i
)
768 TreeModel::Row r
= *i
;
770 ControlProtocolInfo
* cpi
= r
[_model
.protocol_info
];
775 bool const was_enabled
= (cpi
->protocol
!= 0);
776 bool const is_enabled
= r
[_model
.enabled
];
778 if (was_enabled
!= is_enabled
) {
780 ControlProtocolManager::instance().instantiate (*cpi
);
782 ControlProtocolManager::instance().teardown (*cpi
);
786 bool const was_feedback
= (cpi
->protocol
&& cpi
->protocol
->get_feedback ());
787 bool const is_feedback
= r
[_model
.feedback
];
789 if (was_feedback
!= is_feedback
&& cpi
->protocol
) {
790 cpi
->protocol
->set_feedback (is_feedback
);
794 void edit_clicked (GdkEventButton
* ev
)
796 if (ev
->type
!= GDK_2BUTTON_PRESS
) {
801 ControlProtocolInfo
* cpi
;
804 row
= *(_view
.get_selection()->get_selected());
806 Window
* win
= row
[_model
.editor
];
807 if (win
&& !win
->is_visible()) {
810 cpi
= row
[_model
.protocol_info
];
812 if (cpi
&& cpi
->protocol
&& cpi
->protocol
->has_editor ()) {
813 Box
* box
= (Box
*) cpi
->protocol
->get_gui ();
815 string title
= row
[_model
.name
];
816 ArdourDialog
* win
= new ArdourDialog (_parent
, title
);
817 win
->get_vbox()->pack_start (*box
, false, false);
820 row
[_model
.editor
] = win
;
826 class ControlSurfacesModelColumns
: public TreeModelColumnRecord
830 ControlSurfacesModelColumns ()
839 TreeModelColumn
<string
> name
;
840 TreeModelColumn
<bool> enabled
;
841 TreeModelColumn
<bool> feedback
;
842 TreeModelColumn
<ControlProtocolInfo
*> protocol_info
;
843 TreeModelColumn
<Gtk::Window
*> editor
;
846 Glib::RefPtr
<ListStore
> _store
;
847 ControlSurfacesModelColumns _model
;
849 Gtk::Window
& _parent
;
853 RCOptionEditor::RCOptionEditor ()
854 : OptionEditor (Config
, string_compose (_("%1 Preferences"), PROGRAM_NAME
))
855 , _rc_config (Config
)
859 add_option (_("Misc"), new OptionEditorHeading (_("Metering")));
861 ComboOption
<float>* mht
= new ComboOption
<float> (
863 _("Meter hold time"),
864 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_meter_hold
),
865 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_meter_hold
)
868 mht
->add (MeterHoldOff
, _("off"));
869 mht
->add (MeterHoldShort
, _("short"));
870 mht
->add (MeterHoldMedium
, _("medium"));
871 mht
->add (MeterHoldLong
, _("long"));
873 add_option (_("Misc"), mht
);
875 ComboOption
<float>* mfo
= new ComboOption
<float> (
878 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_meter_falloff
),
879 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_meter_falloff
)
882 mfo
->add (METER_FALLOFF_OFF
, _("off"));
883 mfo
->add (METER_FALLOFF_SLOWEST
, _("slowest"));
884 mfo
->add (METER_FALLOFF_SLOW
, _("slow"));
885 mfo
->add (METER_FALLOFF_MEDIUM
, _("medium"));
886 mfo
->add (METER_FALLOFF_FAST
, _("fast"));
887 mfo
->add (METER_FALLOFF_FASTER
, _("faster"));
888 mfo
->add (METER_FALLOFF_FASTEST
, _("fastest"));
890 add_option (_("Misc"), mfo
);
892 add_option (_("Misc"), new OptionEditorHeading (_("Undo")));
894 add_option (_("Misc"), new UndoOptions (_rc_config
));
896 add_option (_("Misc"), new OptionEditorHeading (_("Misc")));
899 /* font scaling does nothing with GDK/Quartz */
900 add_option (_("Misc"), new FontScalingOptions (_rc_config
));
903 add_option (_("Misc"),
905 "verify-remove-last-capture",
906 _("Verify removal of last capture"),
907 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_verify_remove_last_capture
),
908 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_verify_remove_last_capture
)
911 add_option (_("Misc"),
913 "periodic-safety-backups",
914 _("Make periodic backups of the session file"),
915 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_periodic_safety_backups
),
916 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_periodic_safety_backups
)
919 add_option (_("Misc"),
921 "sync-all-route-ordering",
922 _("Syncronise editor and mixer track order"),
923 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_sync_all_route_ordering
),
924 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_sync_all_route_ordering
)
927 add_option (_("Misc"),
929 "only-copy-imported-files",
930 _("Always copy imported files"),
931 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_only_copy_imported_files
),
932 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_only_copy_imported_files
)
935 add_option (_("Misc"),
938 _("Use narrow mixer strips"),
939 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_default_narrow_ms
),
940 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_default_narrow_ms
)
943 add_option (_("Misc"),
946 _("Name new markers"),
947 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_name_new_markers
),
948 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_name_new_markers
)
951 add_option (_("Misc"), new OptionEditorHeading (_("Click")));
953 add_option (_("Misc"), new ClickOptions (_rc_config
, this));
957 add_option (_("Transport"),
959 "latched-record-enable",
960 _("Keep record-enable engaged on stop"),
961 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_latched_record_enable
),
962 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_latched_record_enable
)
965 add_option (_("Transport"),
967 "stop-recording-on-xrun",
968 _("Stop recording when an xrun occurs"),
969 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_stop_recording_on_xrun
),
970 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_stop_recording_on_xrun
)
973 add_option (_("Transport"),
975 "create-xrun-marker",
976 _("Create markers where xruns occur"),
977 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_create_xrun_marker
),
978 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_create_xrun_marker
)
981 add_option (_("Transport"),
983 "stop-at-session-end",
984 _("Stop at the end of the session"),
985 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_stop_at_session_end
),
986 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_stop_at_session_end
)
989 add_option (_("Transport"),
991 "primary-clock-delta-edit-cursor",
992 _("Primary clock delta to edit cursor"),
993 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_primary_clock_delta_edit_cursor
),
994 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_primary_clock_delta_edit_cursor
)
997 add_option (_("Transport"),
999 "secondary-clock-delta-edit-cursor",
1000 _("Secondary clock delta to edit cursor"),
1001 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_secondary_clock_delta_edit_cursor
),
1002 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_secondary_clock_delta_edit_cursor
)
1005 add_option (_("Transport"),
1007 "disable-disarm-during-roll",
1008 _("Disable per-track record disarm while rolling"),
1009 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_disable_disarm_during_roll
),
1010 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_disable_disarm_during_roll
)
1013 add_option (_("Transport"),
1016 _("12dB gain reduction during fast-forward and fast-rewind"),
1017 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_quieten_at_speed
),
1018 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_quieten_at_speed
)
1023 add_option (_("Editor"),
1025 "link-region-and-track-selection",
1026 _("Link selection of regions and tracks"),
1027 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_link_region_and_track_selection
),
1028 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_link_region_and_track_selection
)
1031 add_option (_("Editor"),
1033 "automation-follows-regions",
1034 _("Move relevant automation when regions are moved"),
1035 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_automation_follows_regions
),
1036 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_automation_follows_regions
)
1039 add_option (_("Editor"),
1041 "show-track-meters",
1042 _("Show meters on tracks in the editor"),
1043 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_track_meters
),
1044 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_track_meters
)
1047 add_option (_("Editor"),
1049 "use-overlap-equivalency",
1050 _("Use overlap equivalency for regions"),
1051 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_use_overlap_equivalency
),
1052 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_use_overlap_equivalency
)
1055 add_option (_("Editor"),
1057 "rubberbanding-snaps-to-grid",
1058 _("Make rubberband selection rectangle snap to the grid"),
1059 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_rubberbanding_snaps_to_grid
),
1060 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_rubberbanding_snaps_to_grid
)
1063 add_option (_("Editor"),
1066 _("Show waveforms in regions"),
1067 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_waveforms
),
1068 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_waveforms
)
1071 ComboOption
<WaveformScale
>* wfs
= new ComboOption
<WaveformScale
> (
1073 _("Waveform scale"),
1074 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_waveform_scale
),
1075 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_waveform_scale
)
1078 wfs
->add (Linear
, _("linear"));
1079 wfs
->add (Logarithmic
, _("logarithmic"));
1081 add_option (_("Editor"), wfs
);
1083 ComboOption
<WaveformShape
>* wfsh
= new ComboOption
<WaveformShape
> (
1085 _("Waveform shape"),
1086 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_waveform_shape
),
1087 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_waveform_shape
)
1090 wfsh
->add (Traditional
, _("traditional"));
1091 wfsh
->add (Rectified
, _("rectified"));
1093 add_option (_("Editor"), wfsh
);
1095 add_option (_("Editor"),
1097 "show-waveforms-while-recording",
1098 _("Show waveforms for audio while it is being recorded"),
1099 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_waveforms_while_recording
),
1100 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_waveforms_while_recording
)
1105 add_option (_("Audio"), new OptionEditorHeading (_("Monitoring")));
1107 add_option (_("Audio"),
1110 _("Use a monitor bus (allows AFL/PFL and more control)"),
1111 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_use_monitor_bus
),
1112 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_use_monitor_bus
)
1115 ComboOption
<MonitorModel
>* mm
= new ComboOption
<MonitorModel
> (
1117 _("Monitoring handled by"),
1118 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_monitoring_model
),
1119 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_monitoring_model
)
1123 /* no JACK monitoring on CoreAudio */
1124 if (AudioEngine::instance()->can_request_hardware_monitoring()) {
1125 mm
->add (HardwareMonitoring
, _("JACK"));
1128 mm
->add (SoftwareMonitoring
, _("ardour"));
1129 mm
->add (ExternalMonitoring
, _("audio hardware"));
1131 add_option (_("Audio"), mm
);
1133 add_option (_("Audio"),
1135 "tape-machine-mode",
1136 _("Tape machine mode"),
1137 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_tape_machine_mode
),
1138 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_tape_machine_mode
)
1141 add_option (_("Audio"), new OptionEditorHeading (_("Connection of tracks and busses")));
1143 add_option (_("Audio"),
1145 "auto-connect-standard-busses",
1146 _("Auto-connect master/monitor busses"),
1147 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_auto_connect_standard_busses
),
1148 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_auto_connect_standard_busses
)
1151 ComboOption
<AutoConnectOption
>* iac
= new ComboOption
<AutoConnectOption
> (
1152 "input-auto-connect",
1153 _("Connect track and bus inputs"),
1154 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_input_auto_connect
),
1155 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_input_auto_connect
)
1158 iac
->add (AutoConnectPhysical
, _("automatically to physical inputs"));
1159 iac
->add (ManualConnect
, _("manually"));
1161 add_option (_("Audio"), iac
);
1163 ComboOption
<AutoConnectOption
>* oac
= new ComboOption
<AutoConnectOption
> (
1164 "output-auto-connect",
1165 _("Connect track and bus outputs"),
1166 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_output_auto_connect
),
1167 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_output_auto_connect
)
1170 oac
->add (AutoConnectPhysical
, _("automatically to physical outputs"));
1171 oac
->add (AutoConnectMaster
, _("automatically to master outputs"));
1172 oac
->add (ManualConnect
, _("manually"));
1174 add_option (_("Audio"), oac
);
1176 add_option (_("Audio"), new OptionEditorHeading (_("Denormals")));
1178 add_option (_("Audio"),
1180 "denormal-protection",
1181 _("Use DC bias to protect against denormals"),
1182 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_denormal_protection
),
1183 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_denormal_protection
)
1186 ComboOption
<DenormalModel
>* dm
= new ComboOption
<DenormalModel
> (
1188 _("Processor handling"),
1189 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_denormal_model
),
1190 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_denormal_model
)
1193 dm
->add (DenormalNone
, _("no processor handling"));
1197 if (fpu
.has_flush_to_zero()) {
1198 dm
->add (DenormalFTZ
, _("use FlushToZero"));
1201 if (fpu
.has_denormals_are_zero()) {
1202 dm
->add (DenormalDAZ
, _("use DenormalsAreZero"));
1205 if (fpu
.has_flush_to_zero() && fpu
.has_denormals_are_zero()) {
1206 dm
->add (DenormalFTZDAZ
, _("use FlushToZero and DenormalsAreZerO"));
1209 add_option (_("Audio"), dm
);
1211 add_option (_("Audio"), new OptionEditorHeading (_("Plugins")));
1213 add_option (_("Audio"),
1215 "plugins-stop-with-transport",
1216 _("Stop plugins when the transport is stopped"),
1217 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_plugins_stop_with_transport
),
1218 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_plugins_stop_with_transport
)
1221 add_option (_("Audio"),
1223 "do-not-record-plugins",
1224 _("Disable plugins during recording"),
1225 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_do_not_record_plugins
),
1226 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_do_not_record_plugins
)
1229 add_option (_("Audio"),
1231 "new-plugins-active",
1232 _("Make new plugins active"),
1233 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_new_plugins_active
),
1234 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_new_plugins_active
)
1237 add_option (_("Audio"),
1239 "auto-analyse-audio",
1240 _("Enable automatic analysis of audio"),
1241 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_auto_analyse_audio
),
1242 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_auto_analyse_audio
)
1247 cout
<< "FUCK: " << _rc_config
->get_solo_mute_gain() << "\n";
1249 add_option (_("Solo / mute"),
1252 _("Solo mute cut (dB)"),
1253 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_mute_gain
),
1254 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_mute_gain
)
1257 add_option (_("Solo / mute"),
1259 "solo-control-is-listen-control",
1260 _("Solo controls are Listen controls"),
1261 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_control_is_listen_control
),
1262 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_control_is_listen_control
)
1265 ComboOption
<ListenPosition
>* lp
= new ComboOption
<ListenPosition
> (
1267 _("Listen Position"),
1268 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_listen_position
),
1269 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_listen_position
)
1272 lp
->add (AfterFaderListen
, _("after-fader listen"));
1273 lp
->add (PreFaderListen
, _("pre-fader listen"));
1275 add_option (_("Solo / mute"), lp
);
1277 add_option (_("Solo / mute"),
1280 _("Exclusive solo"),
1281 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_exclusive_solo
),
1282 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_exclusive_solo
)
1285 add_option (_("Solo / mute"),
1288 _("Show solo muting"),
1289 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_solo_mutes
),
1290 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_solo_mutes
)
1293 add_option (_("Solo / mute"),
1295 "solo-mute-override",
1296 _("Soloing overrides muting"),
1297 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_mute_override
),
1298 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_mute_override
)
1301 add_option (_("Solo / mute"), new OptionEditorHeading (_("Default track / bus muting options")));
1303 add_option (_("Solo / mute"),
1305 "mute-affects-pre-fader",
1306 _("Mute affects pre-fader sends"),
1307 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_pre_fader
),
1308 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_pre_fader
)
1311 add_option (_("Solo / mute"),
1313 "mute-affects-post-fader",
1314 _("Mute affects post-fader sends"),
1315 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_post_fader
),
1316 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_post_fader
)
1319 add_option (_("Solo / mute"),
1321 "mute-affects-control-outs",
1322 _("Mute affects control outputs"),
1323 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_control_outs
),
1324 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_control_outs
)
1327 add_option (_("Solo / mute"),
1329 "mute-affects-main-outs",
1330 _("Mute affects main outputs"),
1331 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_main_outs
),
1332 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_main_outs
)
1337 list
<ComboOption
<string
>* > midi_combos
;
1339 midi_combos
.push_back (new ComboOption
<string
> (
1341 _("Send/Receive MTC via"),
1342 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mtc_port_name
),
1343 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mtc_port_name
)
1346 midi_combos
.push_back (new ComboOption
<string
> (
1347 "midi-clock-port-name",
1348 _("Send/Receive MIDI clock via"),
1349 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_midi_clock_port_name
),
1350 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_midi_clock_port_name
)
1353 midi_combos
.push_back (new ComboOption
<string
> (
1355 _("Send/Receive MMC via"),
1356 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_port_name
),
1357 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_port_name
)
1360 midi_combos
.push_back (new ComboOption
<string
> (
1362 _("Send/Receive MIDI parameter control via"),
1363 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_midi_port_name
),
1364 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_midi_port_name
)
1367 add_option (_("MIDI control"), new MIDIPorts (_rc_config
, midi_combos
));
1369 for (list
<ComboOption
<string
>* >::iterator i
= midi_combos
.begin(); i
!= midi_combos
.end(); ++i
) {
1370 add_option (_("MIDI control"), *i
);
1373 add_option (_("MIDI control"),
1376 _("Send MIDI Time Code"),
1377 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_mtc
),
1378 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_mtc
)
1381 add_option (_("MIDI control"),
1384 _("Obey MIDI Machine Control commands"),
1385 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_control
),
1386 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_control
)
1390 add_option (_("MIDI control"),
1393 _("Send MIDI Machine Control commands"),
1394 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_mmc
),
1395 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_mmc
)
1398 add_option (_("MIDI control"),
1401 _("Send MIDI control feedback"),
1402 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_midi_feedback
),
1403 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_midi_feedback
)
1406 add_option (_("MIDI control"),
1407 new SpinOption
<uint8_t> (
1408 "mmc-receive-device-id",
1409 _("Inbound MMC device ID"),
1410 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_receive_device_id
),
1411 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_receive_device_id
),
1415 add_option (_("MIDI control"),
1416 new SpinOption
<uint8_t> (
1417 "mmc-send-device-id",
1418 _("Outbound MMC device ID"),
1419 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_send_device_id
),
1420 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_send_device_id
),
1424 add_option (_("MIDI control"),
1425 new SpinOption
<int32_t> (
1426 "initial-program-change",
1427 _("Initial program change"),
1428 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_initial_program_change
),
1429 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_initial_program_change
),
1433 /* CONTROL SURFACES */
1435 add_option (_("Control surfaces"), new ControlSurfacesOptions (*this));
1437 ComboOption
<RemoteModel
>* rm
= new ComboOption
<RemoteModel
> (
1439 _("Control surface remote ID"),
1440 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_remote_model
),
1441 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_remote_model
)
1444 rm
->add (UserOrdered
, _("assigned by user"));
1445 rm
->add (MixerOrdered
, _("follows order of mixer"));
1446 rm
->add (EditorOrdered
, _("follows order of editor"));
1448 add_option (_("Control surfaces"), rm
);
1452 add_option (_("Keyboard"), new KeyboardOptions
);