X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Frc_option_editor.cc;h=722612d21c9ffaec7d3c6d863c384c0640119aa3;hb=b502bbc61895d61c39bf240b47e8a3664be2c541;hp=f77c4c2cceff31f36c6c4418f3cf196d7257189d;hpb=d8de0f94f18f2e3da1010f52c641f0ea2fc6ceb1;p=ardour.git diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index f77c4c2cce..722612d21c 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1,3 +1,7 @@ +#ifdef WAF_BUILD +#include "gtk2ardour-config.h" +#endif + #include #include #include @@ -256,7 +260,10 @@ public: _delete_button_adjustment (3, 1, 12), _delete_button_spin (_delete_button_adjustment), _edit_button_adjustment (3, 1, 5), - _edit_button_spin (_edit_button_adjustment) + _edit_button_spin (_edit_button_adjustment), + _insert_note_button_adjustment (3, 1, 5), + _insert_note_button_spin (_insert_note_button_adjustment) + { /* internationalize and prepare for use with combos */ @@ -323,6 +330,35 @@ public: _delete_button_adjustment.set_value (Keyboard::delete_button()); _delete_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed)); + + set_popdown_strings (_insert_note_modifier_combo, dumb); + _insert_note_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen)); + + for (int x = 0; modifiers[x].name; ++x) { + if (modifiers[x].modifier == Keyboard::insert_note_modifier ()) { + _insert_note_modifier_combo.set_active_text (_(modifiers[x].name)); + break; + } + } + + l = manage (new Label (_("Insert note using:"))); + l->set_name ("OptionsLabel"); + l->set_alignment (0, 0.5); + + t->attach (*l, 0, 1, 2, 3, FILL | EXPAND, FILL); + t->attach (_insert_note_modifier_combo, 1, 2, 2, 3, FILL | EXPAND, FILL); + + l = manage (new Label (_("+ button"))); + l->set_name ("OptionsLabel"); + + t->attach (*l, 3, 4, 2, 3, FILL | EXPAND, FILL); + t->attach (_insert_note_button_spin, 4, 5, 2, 3, FILL | EXPAND, FILL); + + _insert_note_button_spin.set_name ("OptionsEntry"); + _insert_note_button_adjustment.set_value (Keyboard::insert_note_button()); + _insert_note_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed)); + + set_popdown_strings (_snap_modifier_combo, dumb); _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen)); @@ -337,8 +373,8 @@ public: l->set_name ("OptionsLabel"); l->set_alignment (0, 0.5); - t->attach (*l, 0, 1, 2, 3, FILL | EXPAND, FILL); - t->attach (_snap_modifier_combo, 1, 2, 2, 3, FILL | EXPAND, FILL); + t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL); + t->attach (_snap_modifier_combo, 1, 2, 3, 4, FILL | EXPAND, FILL); vector strs; @@ -354,8 +390,8 @@ public: l->set_name ("OptionsLabel"); l->set_alignment (0, 0.5); - t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL); - t->attach (_keyboard_layout_selector, 1, 2, 3, 4, FILL | EXPAND, FILL); + t->attach (*l, 0, 1, 4, 5, FILL | EXPAND, FILL); + t->attach (_keyboard_layout_selector, 1, 2, 4, 5, FILL | EXPAND, FILL); _box->pack_start (*t, false, false); } @@ -411,6 +447,18 @@ private: } } + void insert_note_modifier_chosen () + { + string const txt = _insert_note_modifier_combo.get_active_text(); + + for (int i = 0; modifiers[i].name; ++i) { + if (txt == _(modifiers[i].name)) { + Keyboard::set_insert_note_modifier (modifiers[i].modifier); + break; + } + } + } + void snap_modifier_chosen () { string const txt = _snap_modifier_combo.get_active_text(); @@ -433,14 +481,23 @@ private: Keyboard::set_edit_button (_edit_button_spin.get_value_as_int()); } + void insert_note_button_changed () + { + Keyboard::set_insert_note_button (_insert_note_button_spin.get_value_as_int()); + } + ComboBoxText _keyboard_layout_selector; ComboBoxText _edit_modifier_combo; ComboBoxText _delete_modifier_combo; + ComboBoxText _insert_note_modifier_combo; ComboBoxText _snap_modifier_combo; Adjustment _delete_button_adjustment; SpinButton _delete_button_spin; Adjustment _edit_button_adjustment; SpinButton _edit_button_spin; + Adjustment _insert_note_button_adjustment; + SpinButton _insert_note_button_spin; + }; class FontScalingOptions : public OptionEditorBox @@ -715,7 +772,7 @@ RCOptionEditor::RCOptionEditor () if (hwcpus > 1) { add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization"))); - ComboOption* procs = new ComboOption ( + ComboOption* procs = new ComboOption ( "processor-usage", _("Signal processing uses"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_processor_usage), @@ -725,8 +782,8 @@ RCOptionEditor::RCOptionEditor () procs->add (-1, _("all but one processor")); procs->add (0, _("all available processors")); - for (uint32_t i = 2; i < hwcpus; ++i) { - procs->add (1, string_compose (_("%1 processors"), i)); + for (uint32_t i = 1; i <= hwcpus; ++i) { + procs->add (i, string_compose (_("%1 processors"), i)); } add_option (_("Misc"), procs); @@ -862,6 +919,14 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_stop_at_session_end) )); + add_option (_("Transport"), + new BoolOption ( + "seamless-loop", + _("Do seamless looping (not possible when slaved to MTC, JACK etc)"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_seamless_loop), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_seamless_loop) + )); + add_option (_("Transport"), new BoolOption ( "primary-clock-delta-edit-cursor", @@ -907,7 +972,7 @@ RCOptionEditor::RCOptionEditor () add_option (_("Editor"), new BoolOption ( "automation-follows-regions", - _("Move relevant automation when regions are moved"), + _("Move relevant automation when audio regions are moved"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_follows_regions), sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_follows_regions) )); @@ -976,6 +1041,22 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms_while_recording) )); + add_option (_("Editor"), + new BoolOption ( + "show-zoom-tools", + _("Show zoom toolbar"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_zoom_tools), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_zoom_tools) + )); + + add_option (_("Editor"), + new BoolOption ( + "color-regions-using-track-color", + _("Color regions using their track's color"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_color_regions_using_track_color), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_color_regions_using_track_color) + )); + /* AUDIO */ add_option (_("Audio"), new OptionEditorHeading (_("Buffering"))); @@ -994,7 +1075,7 @@ RCOptionEditor::RCOptionEditor () ComboOption* mm = new ComboOption ( "monitoring-model", - _("Monitoring handled by"), + _("Record monitoring handled by"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_monitoring_model), sigc::mem_fun (*_rc_config, &RCConfiguration::set_monitoring_model) ); @@ -1009,6 +1090,30 @@ RCOptionEditor::RCOptionEditor () mm->add (ExternalMonitoring, _("audio hardware")); add_option (_("Audio"), mm); + + ComboOption* pp = new ComboOption ( + "pfl-position", + _("PFL signals come from"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_pfl_position), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_pfl_position) + ); + + pp->add (PFLFromBeforeProcessors, _("before pre-fader processors")); + pp->add (PFLFromAfterProcessors, _("pre-fader but after pre-fader processors")); + + add_option (_("Audio"), pp); + + ComboOption* pa = new ComboOption ( + "afl-position", + _("AFL signals come from"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_afl_position), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_afl_position) + ); + + pa->add (AFLFromBeforeProcessors, _("post-fader but before post-fader processors")); + pa->add (AFLFromAfterProcessors, _("after post-fader processors")); + + add_option (_("Audio"), pa); add_option (_("Audio"), new BoolOption ( @@ -1122,6 +1227,14 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_auto_analyse_audio) )); + add_option (_("Audio"), + new BoolOption ( + "replicate-missing-region-channels", + _("Replicate missing region channels"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_replicate_missing_region_channels), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_replicate_missing_region_channels) + )); + /* SOLO AND MUTE */ add_option (_("Solo / mute"), @@ -1131,26 +1244,29 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_gain), sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_gain) )); - - add_option (_("Solo / mute"), - new BoolOption ( - "solo-control-is-listen-control", - _("Solo controls are Listen controls"), - sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control), - sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control) - )); - ComboOption* lp = new ComboOption ( + _solo_control_is_listen_control = new BoolOption ( + "solo-control-is-listen-control", + _("Solo controls are Listen controls"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control) + ); + + add_option (_("Solo / mute"), _solo_control_is_listen_control); + + _listen_position = new ComboOption ( "listen-position", _("Listen Position"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_listen_position), sigc::mem_fun (*_rc_config, &RCConfiguration::set_listen_position) ); - lp->add (AfterFaderListen, _("after-fader listen")); - lp->add (PreFaderListen, _("pre-fader listen")); + _listen_position->add (AfterFaderListen, _("after-fader listen")); + _listen_position->add (PreFaderListen, _("pre-fader listen")); - add_option (_("Solo / mute"), lp); + add_option (_("Solo / mute"), _listen_position); + + parameter_changed ("use-monitor-bus"); add_option (_("Solo / mute"), new BoolOption ( @@ -1226,6 +1342,15 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mtc) )); + add_option (_("MIDI control"), + new SpinOption ( + "mtc-qf-speed-tolerance", + _("Percentage either side of normal transport speed to transmit MTC"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_mtc_qf_speed_tolerance), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_mtc_qf_speed_tolerance), + 0, 20, 1, 5 + )); + add_option (_("MIDI control"), new BoolOption ( "mmc-control", @@ -1234,7 +1359,6 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_control) )); - add_option (_("MIDI control"), new BoolOption ( "send-mmc", @@ -1300,4 +1424,18 @@ RCOptionEditor::RCOptionEditor () add_option (_("Keyboard"), new KeyboardOptions); } - +void +RCOptionEditor::parameter_changed (string const & p) +{ + OptionEditor::parameter_changed (p); + + if (p == "use-monitor-bus") { + bool const s = Config->get_use_monitor_bus (); + if (!s) { + /* we can't use this if we don't have a monitor bus */ + Config->set_solo_control_is_listen_control (false); + } + _solo_control_is_listen_control->set_sensitive (s); + _listen_position->set_sensitive (s); + } +}