From 0fd1edd78e7132d04dbb07d3202a00a073a6d3e1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 15 Jan 2024 15:28:30 +0100 Subject: [PATCH] Update well-known ctrl: separate global and per band EQ enum --- libs/ardour/ardour/well_known_enum.h | 9 +++--- libs/ardour/luabindings.cc | 8 +++--- libs/surfaces/cc121/cc121.cc | 24 ++++++++-------- libs/surfaces/console1/c1_operations.cc | 28 +++++++++---------- libs/surfaces/console1/console1.cc | 16 +++++------ libs/surfaces/faderport8/faderport8.cc | 8 +++--- .../generic_midi_control_protocol.cc | 8 +++--- .../surfaces/launch_control_xl/controllers.cc | 14 +++++----- .../launch_control_xl/launch_control_xl.cc | 8 +++--- libs/surfaces/mackie/subview.cc | 10 +++---- libs/surfaces/osc/osc.cc | 16 +++++------ libs/surfaces/osc/osc_select_observer.cc | 24 ++++++++-------- libs/surfaces/us2400/strip.cc | 6 ++-- share/scripts/reset_mixer.lua | 8 +++--- 14 files changed, 94 insertions(+), 93 deletions(-) diff --git a/libs/ardour/ardour/well_known_enum.h b/libs/ardour/ardour/well_known_enum.h index e30ee75522..80d3818df9 100644 --- a/libs/ardour/ardour/well_known_enum.h +++ b/libs/ardour/ardour/well_known_enum.h @@ -24,10 +24,11 @@ namespace ARDOUR { enum WellKnownCtrl : int { EQ_Enable, - EQ_Gain, - EQ_Freq, - EQ_Q, - EQ_Shape, + EQ_Mode, + EQ_BandGain, + EQ_BandFreq, + EQ_BandQ, + EQ_BandShape, HPF_Enable, HPF_Freq, diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 1dcc1b8eeb..0e23e9c917 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -2526,10 +2526,10 @@ LuaBindings::common (lua_State* L) .beginNamespace ("WellKnownCtrl") .addConst ("EQ_Enable", ARDOUR::WellKnownCtrl(EQ_Enable)) - .addConst ("EQ_Gain", ARDOUR::WellKnownCtrl(EQ_Gain)) - .addConst ("EQ_Freq", ARDOUR::WellKnownCtrl(EQ_Freq)) - .addConst ("EQ_Q", ARDOUR::WellKnownCtrl(EQ_Q)) - .addConst ("EQ_Shape", ARDOUR::WellKnownCtrl(EQ_Shape)) + .addConst ("EQ_BandGain", ARDOUR::WellKnownCtrl(EQ_BandGain)) + .addConst ("EQ_BandFreq", ARDOUR::WellKnownCtrl(EQ_BandFreq)) + .addConst ("EQ_BandQ", ARDOUR::WellKnownCtrl(EQ_BandQ)) + .addConst ("EQ_BandShape", ARDOUR::WellKnownCtrl(EQ_BandShape)) .addConst ("HPF_Enable", ARDOUR::WellKnownCtrl(HPF_Enable)) .addConst ("HPF_Freq", ARDOUR::WellKnownCtrl(HPF_Freq)) .addConst ("HPF_Slope", ARDOUR::WellKnownCtrl(HPF_Slope)) diff --git a/libs/surfaces/cc121/cc121.cc b/libs/surfaces/cc121/cc121.cc index 0f8fe4def8..1debf8e69c 100644 --- a/libs/surfaces/cc121/cc121.cc +++ b/libs/surfaces/cc121/cc121.cc @@ -398,35 +398,35 @@ CC121::encoder_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb) break; case 0x20: /* EQ 1 Q */ - if (r) { set_controllable (r->mapped_control (EQ_Q, 0), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandQ, 0), adj); } break; case 0x21: /* EQ 2 Q */ - if (r) { set_controllable (r->mapped_control (EQ_Q, 1), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandQ, 1), adj); } break; case 0x22: /* EQ 3 Q */ - if (r) { set_controllable (r->mapped_control (EQ_Q, 2), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandQ, 2), adj); } break; case 0x23: /* EQ 4 Q */ - if (r) { set_controllable (r->mapped_control (EQ_Q, 3), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandQ, 3), adj); } break; case 0x30: /* EQ 1 Frequency */ - if (r) { set_controllable (r->mapped_control (EQ_Freq, 0), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandFreq, 0), adj); } break; case 0x31: /* EQ 2 Frequency */ - if (r) { set_controllable (r->mapped_control (EQ_Freq, 1), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandFreq, 1), adj); } break; case 0x32: /* EQ 3 Frequency */ - if (r) { set_controllable (r->mapped_control (EQ_Freq, 2), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandFreq, 2), adj); } break; case 0x33: /* EQ 4 Frequency */ - if (r) { set_controllable (r->mapped_control (EQ_Freq, 3), adj); } + if (r) { set_controllable (r->mapped_control (EQ_BandFreq, 3), adj); } break; case 0x3C: /* AI */ @@ -449,19 +449,19 @@ CC121::encoder_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb) break; case 0x40: /* EQ 1 Gain */ - if (r) { set_controllable (r->mapped_control(EQ_Gain, 0), adj); } + if (r) { set_controllable (r->mapped_control(EQ_BandGain, 0), adj); } break; case 0x41: /* EQ 2 Gain */ - if (r) { set_controllable (r->mapped_control(EQ_Gain, 1), adj); } + if (r) { set_controllable (r->mapped_control(EQ_BandGain, 1), adj); } break; case 0x42: /* EQ 3 Gain */ - if (r) { set_controllable (r->mapped_control(EQ_Gain, 2), adj); } + if (r) { set_controllable (r->mapped_control(EQ_BandGain, 2), adj); } break; case 0x43: /* EQ 4 Gain */ - if (r) { set_controllable (r->mapped_control(EQ_Gain, 3), adj); } + if (r) { set_controllable (r->mapped_control(EQ_BandGain, 3), adj); } break; case 0x50: /* Value */ diff --git a/libs/surfaces/console1/c1_operations.cc b/libs/surfaces/console1/c1_operations.cc index 2facac747e..6080cc3262 100644 --- a/libs/surfaces/console1/c1_operations.cc +++ b/libs/surfaces/console1/c1_operations.cc @@ -365,8 +365,8 @@ Console1::eq_low_shape (const uint32_t value) if (!_current_stripable) { return; } - if (_current_stripable->mapped_control (EQ_Shape, 0)) - session->set_control (_current_stripable->mapped_control (EQ_Shape, 0), value > 0, PBD::Controllable::UseGroup); + if (_current_stripable->mapped_control (EQ_BandShape, 0)) + session->set_control (_current_stripable->mapped_control (EQ_BandShape, 0), value > 0, PBD::Controllable::UseGroup); else map_eq_low_shape (); } @@ -378,8 +378,8 @@ Console1::eq_high_shape (const uint32_t value) if (!_current_stripable) { return; } - if (_current_stripable->mapped_control (EQ_Shape, 3)) - session->set_control (_current_stripable->mapped_control (EQ_Shape, 3), value > 0, PBD::Controllable::UseGroup); + if (_current_stripable->mapped_control (EQ_BandShape, 3)) + session->set_control (_current_stripable->mapped_control (EQ_BandShape, 3), value > 0, PBD::Controllable::UseGroup); else map_eq_high_shape (); } @@ -387,10 +387,10 @@ Console1::eq_high_shape (const uint32_t value) void Console1::eq_freq (const uint32_t band, uint32_t value) { - if (!_current_stripable || !_current_stripable->mapped_control (EQ_Freq, band)) { + if (!_current_stripable || !_current_stripable->mapped_control (EQ_BandFreq, band)) { return; } - std::shared_ptr control = _current_stripable->mapped_control (EQ_Freq, band); + std::shared_ptr control = _current_stripable->mapped_control (EQ_BandFreq, band); double freq = midi_to_control (control, value); session->set_control (control, freq, PBD::Controllable::UseGroup); } @@ -398,10 +398,10 @@ Console1::eq_freq (const uint32_t band, uint32_t value) void Console1::eq_gain (const uint32_t band, uint32_t value) { - if (!_current_stripable || !_current_stripable->mapped_control (EQ_Gain, band)) { + if (!_current_stripable || !_current_stripable->mapped_control (EQ_BandGain, band)) { return; } - std::shared_ptr control = _current_stripable->mapped_control (EQ_Gain, band); + std::shared_ptr control = _current_stripable->mapped_control (EQ_BandGain, band); double gain = midi_to_control (control, value); session->set_control (control, gain, PBD::Controllable::UseGroup); } @@ -917,7 +917,7 @@ Console1::map_eq_freq (const uint32_t band) } ControllerID controllerID = eq_freq_controller_for_band (band); if (map_encoder (controllerID)) { - std::shared_ptr control = _current_stripable->mapped_control (EQ_Freq, band); + std::shared_ptr control = _current_stripable->mapped_control (EQ_BandFreq, band); map_encoder (controllerID, control); } } @@ -930,7 +930,7 @@ Console1::map_eq_gain (const uint32_t band) } ControllerID controllerID = eq_gain_controller_for_band (band); if (map_encoder (controllerID)) { - std::shared_ptr control = _current_stripable->mapped_control (EQ_Gain, band); + std::shared_ptr control = _current_stripable->mapped_control (EQ_BandGain, band); map_encoder (controllerID, control); } } @@ -941,8 +941,8 @@ Console1::map_eq_low_shape () if (!_current_stripable) return; try { - uint32_t led_value = _current_stripable->mapped_control (EQ_Shape, 0) - ? _current_stripable->mapped_control (EQ_Shape, 0)->get_value () == 0 ? 0 : 63 + uint32_t led_value = _current_stripable->mapped_control (EQ_BandShape, 0) + ? _current_stripable->mapped_control (EQ_BandShape, 0)->get_value () == 0 ? 0 : 63 : 0; get_button (ControllerID::LOW_SHAPE)->set_led_state (led_value); } catch (ControlNotFoundException const&) { @@ -956,8 +956,8 @@ Console1::map_eq_high_shape () if (!_current_stripable) return; try { - uint32_t led_value = _current_stripable->mapped_control (EQ_Shape, 3) - ? _current_stripable->mapped_control (EQ_Shape, 3)->get_value () == 0 ? 0 : 63 + uint32_t led_value = _current_stripable->mapped_control (EQ_BandShape, 3) + ? _current_stripable->mapped_control (EQ_BandShape, 3)->get_value () == 0 ? 0 : 63 : 0; get_button (ControllerID::HIGH_SHAPE)->set_led_state (led_value); } catch (ControlNotFoundException const&) { diff --git a/libs/surfaces/console1/console1.cc b/libs/surfaces/console1/console1.cc index 498c19e7c6..ba460f2e5c 100644 --- a/libs/surfaces/console1/console1.cc +++ b/libs/surfaces/console1/console1.cc @@ -699,23 +699,23 @@ Console1::set_current_stripable (std::shared_ptr r) } for (uint32_t i = 0; i < _current_stripable->eq_band_cnt (); ++i) { - if (_current_stripable->mapped_control (EQ_Freq, i)) { - _current_stripable->mapped_control (EQ_Freq, i)->Changed.connect ( + if (_current_stripable->mapped_control (EQ_BandFreq, i)) { + _current_stripable->mapped_control (EQ_BandFreq, i)->Changed.connect ( stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_freq, this, i), this); } - if (_current_stripable->mapped_control (EQ_Gain, i)) { - _current_stripable->mapped_control (EQ_Gain, i)->Changed.connect ( + if (_current_stripable->mapped_control (EQ_BandGain, i)) { + _current_stripable->mapped_control (EQ_BandGain, i)->Changed.connect ( stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_gain, this, i), this); } } - if (_current_stripable->mapped_control (EQ_Shape, 0)) { - _current_stripable->mapped_control (EQ_Shape, 0)->Changed.connect ( + if (_current_stripable->mapped_control (EQ_BandShape, 0)) { + _current_stripable->mapped_control (EQ_BandShape, 0)->Changed.connect ( stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_low_shape, this), this); } - if (_current_stripable->mapped_control (EQ_Shape, 3)) { - _current_stripable->mapped_control (EQ_Shape, 3)->Changed.connect ( + if (_current_stripable->mapped_control (EQ_BandShape, 3)) { + _current_stripable->mapped_control (EQ_BandShape, 3)->Changed.connect ( stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_high_shape, this), this); } diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index 55c9dc8e43..47d78afb9a 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -1345,10 +1345,10 @@ FaderPort8::build_well_known_processor_ctrls (std::shared_ptr s, int for (int band = 0; band < cnt; ++band) { std::string bn = s->eq_band_name (band); - PUSH_BACK_NON_NULL (string_compose ("Gain %1", bn), s->mapped_control (EQ_Gain, band)); - PUSH_BACK_NON_NULL (string_compose ("Freq %1", bn), s->mapped_control (EQ_Freq, band)); - PUSH_BACK_NON_NULL (string_compose ("Band %1", bn), s->mapped_control (EQ_Q, band)); - PUSH_BACK_NON_NULL (string_compose ("Shape %1", bn), s->mapped_control (EQ_Shape, band)); + PUSH_BACK_NON_NULL (string_compose ("Gain %1", bn), s->mapped_control (EQ_BandGain, band)); + PUSH_BACK_NON_NULL (string_compose ("Freq %1", bn), s->mapped_control (EQ_BandFreq, band)); + PUSH_BACK_NON_NULL (string_compose ("Band %1", bn), s->mapped_control (EQ_BandQ, band)); + PUSH_BACK_NON_NULL (string_compose ("Shape %1", bn), s->mapped_control (EQ_BandShape, band)); } } break; diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index 6f4aff04c9..6f9c6f4183 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -1247,13 +1247,13 @@ GenericMidiControlProtocol::lookup_controllable (const string & str, MIDIControl int band = atoi (path[3]); /* band number */ if (path[2] == X_("gain")) { - c = s->mapped_control (EQ_Gain, band); + c = s->mapped_control (EQ_BandGain, band); } else if (path[2] == X_("freq")) { - c = s->mapped_control (EQ_Freq, band); + c = s->mapped_control (EQ_BandFreq, band); } else if (path[2] == X_("q")) { - c = s->mapped_control (EQ_Q, band); + c = s->mapped_control (EQ_BandQ, band); } else if (path[2] == X_("shape")) { - c = s->mapped_control (EQ_Shape, band); + c = s->mapped_control (EQ_BandShape, band); } } diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc index f49d74857a..10b68a09e1 100644 --- a/libs/surfaces/launch_control_xl/controllers.cc +++ b/libs/surfaces/launch_control_xl/controllers.cc @@ -1326,9 +1326,9 @@ LaunchControlXL::dm_mb_eq (KnobID k, bool gain, uint8_t band) std::shared_ptr ac; std::shared_ptr knob = knob_by_id (k); if (gain) { - ac = first_selected_stripable()->mapped_control(EQ_Gain, band); + ac = first_selected_stripable()->mapped_control(EQ_BandGain, band); } else { - ac = first_selected_stripable()->mapped_control (EQ_Freq, band); + ac = first_selected_stripable()->mapped_control (EQ_BandFreq, band); } if (ac && check_pick_up(knob, ac)) { @@ -1343,9 +1343,9 @@ LaunchControlXL::dm_mb_eq_shape_switch (uint8_t band) return; } - if (first_selected_stripable()->mapped_control (EQ_Shape, band)) { - first_selected_stripable()->mapped_control (EQ_Shape, band)->set_value - (!first_selected_stripable()->mapped_control (EQ_Shape, band)->get_value(), PBD::Controllable::NoGroup ); + if (first_selected_stripable()->mapped_control (EQ_BandShape, band)) { + first_selected_stripable()->mapped_control (EQ_BandShape, band)->set_value + (!first_selected_stripable()->mapped_control (EQ_BandShape, band)->get_value(), PBD::Controllable::NoGroup ); } } @@ -1359,8 +1359,8 @@ LaunchControlXL::dm_mb_eq_shape_enabled(uint8_t band) uint8_t dev_status = dev_nonexistant; - if (first_selected_stripable()->mapped_control (EQ_Shape, band)) { - if (first_selected_stripable()->mapped_control (EQ_Shape, band)->get_value()) { + if (first_selected_stripable()->mapped_control (EQ_BandShape, band)) { + if (first_selected_stripable()->mapped_control (EQ_BandShape, band)->get_value()) { dev_status = dev_active; } else { dev_status = dev_inactive; diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index fcf6142f60..acf04b5717 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -1180,12 +1180,12 @@ LaunchControlXL::init_dm_callbacks() first_selected_stripable()->mapped_control(EQ_Enable)->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons,this), lcxl); } - if (first_selected_stripable()->mapped_control (EQ_Shape, 0)) { - first_selected_stripable()->mapped_control (EQ_Shape, 0)->Changed.connect (stripable_connections, + if (first_selected_stripable()->mapped_control (EQ_BandShape, 0)) { + first_selected_stripable()->mapped_control (EQ_BandShape, 0)->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); } - if (first_selected_stripable()->mapped_control (EQ_Shape, 3)) { - first_selected_stripable()->mapped_control (EQ_Shape, 3)->Changed.connect (stripable_connections, + if (first_selected_stripable()->mapped_control (EQ_BandShape, 3)) { + first_selected_stripable()->mapped_control (EQ_BandShape, 3)->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); } diff --git a/libs/surfaces/mackie/subview.cc b/libs/surfaces/mackie/subview.cc index 118a059276..154627a44f 100644 --- a/libs/surfaces/mackie/subview.cc +++ b/libs/surfaces/mackie/subview.cc @@ -330,7 +330,7 @@ void EQSubview::setup_vpot( case 4: case 6: eq_band = global_strip_position / 2; - pc = _subview_stripable->mapped_control (EQ_Freq, eq_band); + pc = _subview_stripable->mapped_control (EQ_BandFreq, eq_band); band_name = _subview_stripable->eq_band_name (eq_band); pot_id = band_name + "Freq"; break; @@ -339,17 +339,17 @@ void EQSubview::setup_vpot( case 5: case 7: eq_band = global_strip_position / 2; - pc = _subview_stripable->mapped_control (EQ_Gain, eq_band); + pc = _subview_stripable->mapped_control (EQ_BandGain, eq_band); band_name = _subview_stripable->eq_band_name (eq_band); pot_id = band_name + "Gain"; break; case 8: - pc = _subview_stripable->mapped_control (EQ_Shape, 0); //low band "bell" button + pc = _subview_stripable->mapped_control (EQ_BandShape, 0); //low band "bell" button band_name = "lo"; pot_id = band_name + " Shp"; break; case 9: - pc = _subview_stripable->mapped_control (EQ_Shape, 3); //high band "bell" button + pc = _subview_stripable->mapped_control (EQ_BandShape, 3); //high band "bell" button band_name = "hi"; pot_id = band_name + " Shp"; break; @@ -365,7 +365,7 @@ void EQSubview::setup_vpot( case 1: case 2: eq_band = global_strip_position; - pc = _subview_stripable->mapped_control (EQ_Gain, eq_band); + pc = _subview_stripable->mapped_control (EQ_BandGain, eq_band); band_name = _subview_stripable->eq_band_name (eq_band); pot_id = band_name + "Gain"; break; diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 5815766aaf..c542416d34 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -5922,8 +5922,8 @@ OSC::sel_eq_gain (int id, float val, lo_message msg) if (id > 0) { --id; } - if (s->mapped_control (EQ_Gain, id)) { - s->mapped_control (EQ_Gain, id)->set_value (s->mapped_control(EQ_Gain, id)->interface_to_internal (val), PBD::Controllable::NoGroup); + if (s->mapped_control (EQ_BandGain, id)) { + s->mapped_control (EQ_BandGain, id)->set_value (s->mapped_control(EQ_BandGain, id)->interface_to_internal (val), PBD::Controllable::NoGroup); return 0; } } @@ -5940,8 +5940,8 @@ OSC::sel_eq_freq (int id, float val, lo_message msg) if (id > 0) { --id; } - if (s->mapped_control (EQ_Freq, id)) { - s->mapped_control (EQ_Freq, id)->set_value (s->mapped_control (EQ_Freq, id)->interface_to_internal (val), PBD::Controllable::NoGroup); + if (s->mapped_control (EQ_BandFreq, id)) { + s->mapped_control (EQ_BandFreq, id)->set_value (s->mapped_control (EQ_BandFreq, id)->interface_to_internal (val), PBD::Controllable::NoGroup); return 0; } } @@ -5958,8 +5958,8 @@ OSC::sel_eq_q (int id, float val, lo_message msg) if (id > 0) { --id; } - if (s->mapped_control (EQ_Q, id)) { - s->mapped_control (EQ_Q, id)->set_value (s->mapped_control (EQ_Q, id)->interface_to_internal (val), PBD::Controllable::NoGroup); + if (s->mapped_control (EQ_BandQ, id)) { + s->mapped_control (EQ_BandQ, id)->set_value (s->mapped_control (EQ_BandQ, id)->interface_to_internal (val), PBD::Controllable::NoGroup); return 0; } } @@ -5976,8 +5976,8 @@ OSC::sel_eq_shape (int id, float val, lo_message msg) if (id > 0) { --id; } - if (s->mapped_control (EQ_Shape, id)) { - s->mapped_control (EQ_Shape, id)->set_value (s->mapped_control (EQ_Shape, id)->interface_to_internal (val), PBD::Controllable::NoGroup); + if (s->mapped_control (EQ_BandShape, id)) { + s->mapped_control (EQ_BandShape, id)->set_value (s->mapped_control (EQ_BandShape, id)->interface_to_internal (val), PBD::Controllable::NoGroup); return 0; } } diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc index 0eaca44a7c..a965b2f322 100644 --- a/libs/surfaces/osc/osc_select_observer.cc +++ b/libs/surfaces/osc/osc_select_observer.cc @@ -1115,21 +1115,21 @@ OSCSelectObserver::eq_init() if (_strip->eq_band_name(i).size()) { _osc.text_message_with_id (X_("/select/eq_band_name"), i + 1, _strip->eq_band_name (i), in_line, addr); } - if (_strip->mapped_control (EQ_Gain, i)) { - _strip->mapped_control(EQ_Gain, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_Gain, i)), OSC::instance()); - change_message_with_id (X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_Gain, i)); + if (_strip->mapped_control (EQ_BandGain, i)) { + _strip->mapped_control(EQ_BandGain, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)), OSC::instance()); + change_message_with_id (X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i)); } - if (_strip->mapped_control (EQ_Freq, i)) { - _strip->mapped_control (EQ_Freq, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_Freq, i)), OSC::instance()); - change_message_with_id (X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_Freq, i)); + if (_strip->mapped_control (EQ_BandFreq, i)) { + _strip->mapped_control (EQ_BandFreq, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)), OSC::instance()); + change_message_with_id (X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i)); } - if (_strip->mapped_control (EQ_Q, i)) { - _strip->mapped_control (EQ_Q, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_Q, i)), OSC::instance()); - change_message_with_id (X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_Q, i)); + if (_strip->mapped_control (EQ_BandQ, i)) { + _strip->mapped_control (EQ_BandQ, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)), OSC::instance()); + change_message_with_id (X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i)); } - if (_strip->mapped_control (EQ_Shape, i)) { - _strip->mapped_control (EQ_Shape, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_Shape, i)), OSC::instance()); - change_message_with_id (X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_Shape, i)); + if (_strip->mapped_control (EQ_BandShape, i)) { + _strip->mapped_control (EQ_BandShape, i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)), OSC::instance()); + change_message_with_id (X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i)); } } } diff --git a/libs/surfaces/us2400/strip.cc b/libs/surfaces/us2400/strip.cc index 0ff0a355b4..c8a87996ae 100644 --- a/libs/surfaces/us2400/strip.cc +++ b/libs/surfaces/us2400/strip.cc @@ -856,7 +856,7 @@ Strip::setup_trackview_vpot (std::shared_ptr r) case 9: case 10: eq_band = (global_pos-8); - pc = r->mapped_control (EQ_Gain, eq_band); + pc = r->mapped_control (EQ_BandGain, eq_band); _vpot->set_mode(Pot::boost_cut); break; } @@ -875,14 +875,14 @@ Strip::setup_trackview_vpot (std::shared_ptr r) case 12: case 14: { eq_band = (global_pos-8) / 2; - pc = r->mapped_control (EQ_Freq, eq_band); + pc = r->mapped_control (EQ_BandFreq, eq_band); } break; case 9: case 11: case 13: case 15: { eq_band = (global_pos-8) / 2; - pc = r->mapped_control (EQ_Gain, eq_band); + pc = r->mapped_control (EQ_BandGain, eq_band); _vpot->set_mode(Pot::boost_cut); } break; } diff --git a/share/scripts/reset_mixer.lua b/share/scripts/reset_mixer.lua index 309175adad..3c183a5763 100644 --- a/share/scripts/reset_mixer.lua +++ b/share/scripts/reset_mixer.lua @@ -61,14 +61,14 @@ function factory() return function() local i = 0 repeat for _,ctrl in pairs({ - route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Freq, i), - route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Gain, i), - route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Q, i), + route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandFreq, i), + route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandGain, i), + route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandQ, i), }) do reset(ctrl, disp, auto) end i = i + 1 - until route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Freq, i):isnil() + until route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandFreq, i):isnil() end function reset_comp_controls(route, disp, auto)