Update well-known ctrl: separate global and per band EQ enum

This commit is contained in:
Robin Gareus 2024-01-15 15:28:30 +01:00
parent f7d022e38c
commit 0fd1edd78e
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
14 changed files with 94 additions and 93 deletions

View file

@ -24,10 +24,11 @@ namespace ARDOUR {
enum WellKnownCtrl : int enum WellKnownCtrl : int
{ {
EQ_Enable, EQ_Enable,
EQ_Gain, EQ_Mode,
EQ_Freq, EQ_BandGain,
EQ_Q, EQ_BandFreq,
EQ_Shape, EQ_BandQ,
EQ_BandShape,
HPF_Enable, HPF_Enable,
HPF_Freq, HPF_Freq,

View file

@ -2526,10 +2526,10 @@ LuaBindings::common (lua_State* L)
.beginNamespace ("WellKnownCtrl") .beginNamespace ("WellKnownCtrl")
.addConst ("EQ_Enable", ARDOUR::WellKnownCtrl(EQ_Enable)) .addConst ("EQ_Enable", ARDOUR::WellKnownCtrl(EQ_Enable))
.addConst ("EQ_Gain", ARDOUR::WellKnownCtrl(EQ_Gain)) .addConst ("EQ_BandGain", ARDOUR::WellKnownCtrl(EQ_BandGain))
.addConst ("EQ_Freq", ARDOUR::WellKnownCtrl(EQ_Freq)) .addConst ("EQ_BandFreq", ARDOUR::WellKnownCtrl(EQ_BandFreq))
.addConst ("EQ_Q", ARDOUR::WellKnownCtrl(EQ_Q)) .addConst ("EQ_BandQ", ARDOUR::WellKnownCtrl(EQ_BandQ))
.addConst ("EQ_Shape", ARDOUR::WellKnownCtrl(EQ_Shape)) .addConst ("EQ_BandShape", ARDOUR::WellKnownCtrl(EQ_BandShape))
.addConst ("HPF_Enable", ARDOUR::WellKnownCtrl(HPF_Enable)) .addConst ("HPF_Enable", ARDOUR::WellKnownCtrl(HPF_Enable))
.addConst ("HPF_Freq", ARDOUR::WellKnownCtrl(HPF_Freq)) .addConst ("HPF_Freq", ARDOUR::WellKnownCtrl(HPF_Freq))
.addConst ("HPF_Slope", ARDOUR::WellKnownCtrl(HPF_Slope)) .addConst ("HPF_Slope", ARDOUR::WellKnownCtrl(HPF_Slope))

View file

@ -398,35 +398,35 @@ CC121::encoder_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
break; break;
case 0x20: case 0x20:
/* EQ 1 Q */ /* 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; break;
case 0x21: case 0x21:
/* EQ 2 Q */ /* 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; break;
case 0x22: case 0x22:
/* EQ 3 Q */ /* 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; break;
case 0x23: case 0x23:
/* EQ 4 Q */ /* 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; break;
case 0x30: case 0x30:
/* EQ 1 Frequency */ /* 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; break;
case 0x31: case 0x31:
/* EQ 2 Frequency */ /* 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; break;
case 0x32: case 0x32:
/* EQ 3 Frequency */ /* 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; break;
case 0x33: case 0x33:
/* EQ 4 Frequency */ /* 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; break;
case 0x3C: case 0x3C:
/* AI */ /* AI */
@ -449,19 +449,19 @@ CC121::encoder_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
break; break;
case 0x40: case 0x40:
/* EQ 1 Gain */ /* 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; break;
case 0x41: case 0x41:
/* EQ 2 Gain */ /* 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; break;
case 0x42: case 0x42:
/* EQ 3 Gain */ /* 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; break;
case 0x43: case 0x43:
/* EQ 4 Gain */ /* 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; break;
case 0x50: case 0x50:
/* Value */ /* Value */

View file

@ -365,8 +365,8 @@ Console1::eq_low_shape (const uint32_t value)
if (!_current_stripable) { if (!_current_stripable) {
return; return;
} }
if (_current_stripable->mapped_control (EQ_Shape, 0)) if (_current_stripable->mapped_control (EQ_BandShape, 0))
session->set_control (_current_stripable->mapped_control (EQ_Shape, 0), value > 0, PBD::Controllable::UseGroup); session->set_control (_current_stripable->mapped_control (EQ_BandShape, 0), value > 0, PBD::Controllable::UseGroup);
else else
map_eq_low_shape (); map_eq_low_shape ();
} }
@ -378,8 +378,8 @@ Console1::eq_high_shape (const uint32_t value)
if (!_current_stripable) { if (!_current_stripable) {
return; return;
} }
if (_current_stripable->mapped_control (EQ_Shape, 3)) if (_current_stripable->mapped_control (EQ_BandShape, 3))
session->set_control (_current_stripable->mapped_control (EQ_Shape, 3), value > 0, PBD::Controllable::UseGroup); session->set_control (_current_stripable->mapped_control (EQ_BandShape, 3), value > 0, PBD::Controllable::UseGroup);
else else
map_eq_high_shape (); map_eq_high_shape ();
} }
@ -387,10 +387,10 @@ Console1::eq_high_shape (const uint32_t value)
void void
Console1::eq_freq (const uint32_t band, uint32_t value) 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; return;
} }
std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_Freq, band); std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_BandFreq, band);
double freq = midi_to_control (control, value); double freq = midi_to_control (control, value);
session->set_control (control, freq, PBD::Controllable::UseGroup); session->set_control (control, freq, PBD::Controllable::UseGroup);
} }
@ -398,10 +398,10 @@ Console1::eq_freq (const uint32_t band, uint32_t value)
void void
Console1::eq_gain (const uint32_t band, uint32_t value) 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; return;
} }
std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_Gain, band); std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_BandGain, band);
double gain = midi_to_control (control, value); double gain = midi_to_control (control, value);
session->set_control (control, gain, PBD::Controllable::UseGroup); 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); ControllerID controllerID = eq_freq_controller_for_band (band);
if (map_encoder (controllerID)) { if (map_encoder (controllerID)) {
std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_Freq, band); std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_BandFreq, band);
map_encoder (controllerID, control); map_encoder (controllerID, control);
} }
} }
@ -930,7 +930,7 @@ Console1::map_eq_gain (const uint32_t band)
} }
ControllerID controllerID = eq_gain_controller_for_band (band); ControllerID controllerID = eq_gain_controller_for_band (band);
if (map_encoder (controllerID)) { if (map_encoder (controllerID)) {
std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_Gain, band); std::shared_ptr<AutomationControl> control = _current_stripable->mapped_control (EQ_BandGain, band);
map_encoder (controllerID, control); map_encoder (controllerID, control);
} }
} }
@ -941,8 +941,8 @@ Console1::map_eq_low_shape ()
if (!_current_stripable) if (!_current_stripable)
return; return;
try { try {
uint32_t led_value = _current_stripable->mapped_control (EQ_Shape, 0) uint32_t led_value = _current_stripable->mapped_control (EQ_BandShape, 0)
? _current_stripable->mapped_control (EQ_Shape, 0)->get_value () == 0 ? 0 : 63 ? _current_stripable->mapped_control (EQ_BandShape, 0)->get_value () == 0 ? 0 : 63
: 0; : 0;
get_button (ControllerID::LOW_SHAPE)->set_led_state (led_value); get_button (ControllerID::LOW_SHAPE)->set_led_state (led_value);
} catch (ControlNotFoundException const&) { } catch (ControlNotFoundException const&) {
@ -956,8 +956,8 @@ Console1::map_eq_high_shape ()
if (!_current_stripable) if (!_current_stripable)
return; return;
try { try {
uint32_t led_value = _current_stripable->mapped_control (EQ_Shape, 3) uint32_t led_value = _current_stripable->mapped_control (EQ_BandShape, 3)
? _current_stripable->mapped_control (EQ_Shape, 3)->get_value () == 0 ? 0 : 63 ? _current_stripable->mapped_control (EQ_BandShape, 3)->get_value () == 0 ? 0 : 63
: 0; : 0;
get_button (ControllerID::HIGH_SHAPE)->set_led_state (led_value); get_button (ControllerID::HIGH_SHAPE)->set_led_state (led_value);
} catch (ControlNotFoundException const&) { } catch (ControlNotFoundException const&) {

View file

@ -699,23 +699,23 @@ Console1::set_current_stripable (std::shared_ptr<Stripable> r)
} }
for (uint32_t i = 0; i < _current_stripable->eq_band_cnt (); ++i) { for (uint32_t i = 0; i < _current_stripable->eq_band_cnt (); ++i) {
if (_current_stripable->mapped_control (EQ_Freq, i)) { if (_current_stripable->mapped_control (EQ_BandFreq, i)) {
_current_stripable->mapped_control (EQ_Freq, i)->Changed.connect ( _current_stripable->mapped_control (EQ_BandFreq, i)->Changed.connect (
stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_freq, this, i), this); stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_freq, this, i), this);
} }
if (_current_stripable->mapped_control (EQ_Gain, i)) { if (_current_stripable->mapped_control (EQ_BandGain, i)) {
_current_stripable->mapped_control (EQ_Gain, i)->Changed.connect ( _current_stripable->mapped_control (EQ_BandGain, i)->Changed.connect (
stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_gain, this, i), this); stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_gain, this, i), this);
} }
} }
if (_current_stripable->mapped_control (EQ_Shape, 0)) { if (_current_stripable->mapped_control (EQ_BandShape, 0)) {
_current_stripable->mapped_control (EQ_Shape, 0)->Changed.connect ( _current_stripable->mapped_control (EQ_BandShape, 0)->Changed.connect (
stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_low_shape, this), this); stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_low_shape, this), this);
} }
if (_current_stripable->mapped_control (EQ_Shape, 3)) { if (_current_stripable->mapped_control (EQ_BandShape, 3)) {
_current_stripable->mapped_control (EQ_Shape, 3)->Changed.connect ( _current_stripable->mapped_control (EQ_BandShape, 3)->Changed.connect (
stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_high_shape, this), this); stripable_connections, MISSING_INVALIDATOR, boost::bind (&Console1::map_eq_high_shape, this), this);
} }

View file

@ -1345,10 +1345,10 @@ FaderPort8::build_well_known_processor_ctrls (std::shared_ptr<Stripable> s, int
for (int band = 0; band < cnt; ++band) { for (int band = 0; band < cnt; ++band) {
std::string bn = s->eq_band_name (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 ("Gain %1", bn), s->mapped_control (EQ_BandGain, band));
PUSH_BACK_NON_NULL (string_compose ("Freq %1", bn), s->mapped_control (EQ_Freq, 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_Q, 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_Shape, band)); PUSH_BACK_NON_NULL (string_compose ("Shape %1", bn), s->mapped_control (EQ_BandShape, band));
} }
} }
break; break;

View file

@ -1247,13 +1247,13 @@ GenericMidiControlProtocol::lookup_controllable (const string & str, MIDIControl
int band = atoi (path[3]); /* band number */ int band = atoi (path[3]); /* band number */
if (path[2] == X_("gain")) { 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")) { } 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")) { } 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")) { } else if (path[2] == X_("shape")) {
c = s->mapped_control (EQ_Shape, band); c = s->mapped_control (EQ_BandShape, band);
} }
} }

View file

@ -1326,9 +1326,9 @@ LaunchControlXL::dm_mb_eq (KnobID k, bool gain, uint8_t band)
std::shared_ptr<AutomationControl> ac; std::shared_ptr<AutomationControl> ac;
std::shared_ptr<Knob> knob = knob_by_id (k); std::shared_ptr<Knob> knob = knob_by_id (k);
if (gain) { if (gain) {
ac = first_selected_stripable()->mapped_control(EQ_Gain, band); ac = first_selected_stripable()->mapped_control(EQ_BandGain, band);
} else { } 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)) { if (ac && check_pick_up(knob, ac)) {
@ -1343,9 +1343,9 @@ LaunchControlXL::dm_mb_eq_shape_switch (uint8_t band)
return; return;
} }
if (first_selected_stripable()->mapped_control (EQ_Shape, band)) { if (first_selected_stripable()->mapped_control (EQ_BandShape, band)) {
first_selected_stripable()->mapped_control (EQ_Shape, band)->set_value first_selected_stripable()->mapped_control (EQ_BandShape, band)->set_value
(!first_selected_stripable()->mapped_control (EQ_Shape, band)->get_value(), PBD::Controllable::NoGroup ); (!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; uint8_t dev_status = dev_nonexistant;
if (first_selected_stripable()->mapped_control (EQ_Shape, band)) { if (first_selected_stripable()->mapped_control (EQ_BandShape, band)) {
if (first_selected_stripable()->mapped_control (EQ_Shape, band)->get_value()) { if (first_selected_stripable()->mapped_control (EQ_BandShape, band)->get_value()) {
dev_status = dev_active; dev_status = dev_active;
} else { } else {
dev_status = dev_inactive; dev_status = dev_inactive;

View file

@ -1180,12 +1180,12 @@ LaunchControlXL::init_dm_callbacks()
first_selected_stripable()->mapped_control(EQ_Enable)->Changed.connect (stripable_connections, first_selected_stripable()->mapped_control(EQ_Enable)->Changed.connect (stripable_connections,
MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons,this), lcxl); MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_knobs_and_buttons,this), lcxl);
} }
if (first_selected_stripable()->mapped_control (EQ_Shape, 0)) { if (first_selected_stripable()->mapped_control (EQ_BandShape, 0)) {
first_selected_stripable()->mapped_control (EQ_Shape, 0)->Changed.connect (stripable_connections, first_selected_stripable()->mapped_control (EQ_BandShape, 0)->Changed.connect (stripable_connections,
MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl);
} }
if (first_selected_stripable()->mapped_control (EQ_Shape, 3)) { if (first_selected_stripable()->mapped_control (EQ_BandShape, 3)) {
first_selected_stripable()->mapped_control (EQ_Shape, 3)->Changed.connect (stripable_connections, first_selected_stripable()->mapped_control (EQ_BandShape, 3)->Changed.connect (stripable_connections,
MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl); MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::init_buttons,this), lcxl);
} }

View file

@ -330,7 +330,7 @@ void EQSubview::setup_vpot(
case 4: case 4:
case 6: case 6:
eq_band = global_strip_position / 2; 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); band_name = _subview_stripable->eq_band_name (eq_band);
pot_id = band_name + "Freq"; pot_id = band_name + "Freq";
break; break;
@ -339,17 +339,17 @@ void EQSubview::setup_vpot(
case 5: case 5:
case 7: case 7:
eq_band = global_strip_position / 2; 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); band_name = _subview_stripable->eq_band_name (eq_band);
pot_id = band_name + "Gain"; pot_id = band_name + "Gain";
break; break;
case 8: 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"; band_name = "lo";
pot_id = band_name + " Shp"; pot_id = band_name + " Shp";
break; break;
case 9: 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"; band_name = "hi";
pot_id = band_name + " Shp"; pot_id = band_name + " Shp";
break; break;
@ -365,7 +365,7 @@ void EQSubview::setup_vpot(
case 1: case 1:
case 2: case 2:
eq_band = global_strip_position; 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); band_name = _subview_stripable->eq_band_name (eq_band);
pot_id = band_name + "Gain"; pot_id = band_name + "Gain";
break; break;

View file

@ -5922,8 +5922,8 @@ OSC::sel_eq_gain (int id, float val, lo_message msg)
if (id > 0) { if (id > 0) {
--id; --id;
} }
if (s->mapped_control (EQ_Gain, id)) { if (s->mapped_control (EQ_BandGain, id)) {
s->mapped_control (EQ_Gain, id)->set_value (s->mapped_control(EQ_Gain, id)->interface_to_internal (val), PBD::Controllable::NoGroup); s->mapped_control (EQ_BandGain, id)->set_value (s->mapped_control(EQ_BandGain, id)->interface_to_internal (val), PBD::Controllable::NoGroup);
return 0; return 0;
} }
} }
@ -5940,8 +5940,8 @@ OSC::sel_eq_freq (int id, float val, lo_message msg)
if (id > 0) { if (id > 0) {
--id; --id;
} }
if (s->mapped_control (EQ_Freq, id)) { if (s->mapped_control (EQ_BandFreq, id)) {
s->mapped_control (EQ_Freq, id)->set_value (s->mapped_control (EQ_Freq, id)->interface_to_internal (val), PBD::Controllable::NoGroup); s->mapped_control (EQ_BandFreq, id)->set_value (s->mapped_control (EQ_BandFreq, id)->interface_to_internal (val), PBD::Controllable::NoGroup);
return 0; return 0;
} }
} }
@ -5958,8 +5958,8 @@ OSC::sel_eq_q (int id, float val, lo_message msg)
if (id > 0) { if (id > 0) {
--id; --id;
} }
if (s->mapped_control (EQ_Q, id)) { if (s->mapped_control (EQ_BandQ, id)) {
s->mapped_control (EQ_Q, id)->set_value (s->mapped_control (EQ_Q, id)->interface_to_internal (val), PBD::Controllable::NoGroup); s->mapped_control (EQ_BandQ, id)->set_value (s->mapped_control (EQ_BandQ, id)->interface_to_internal (val), PBD::Controllable::NoGroup);
return 0; return 0;
} }
} }
@ -5976,8 +5976,8 @@ OSC::sel_eq_shape (int id, float val, lo_message msg)
if (id > 0) { if (id > 0) {
--id; --id;
} }
if (s->mapped_control (EQ_Shape, id)) { if (s->mapped_control (EQ_BandShape, id)) {
s->mapped_control (EQ_Shape, id)->set_value (s->mapped_control (EQ_Shape, id)->interface_to_internal (val), PBD::Controllable::NoGroup); s->mapped_control (EQ_BandShape, id)->set_value (s->mapped_control (EQ_BandShape, id)->interface_to_internal (val), PBD::Controllable::NoGroup);
return 0; return 0;
} }
} }

View file

@ -1115,21 +1115,21 @@ OSCSelectObserver::eq_init()
if (_strip->eq_band_name(i).size()) { 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); _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)) { if (_strip->mapped_control (EQ_BandGain, 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()); _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_Gain, i)); change_message_with_id (X_("/select/eq_gain"), i + 1, _strip->mapped_control(EQ_BandGain, i));
} }
if (_strip->mapped_control (EQ_Freq, i)) { if (_strip->mapped_control (EQ_BandFreq, 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()); _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_Freq, i)); change_message_with_id (X_("/select/eq_freq"), i + 1, _strip->mapped_control (EQ_BandFreq, i));
} }
if (_strip->mapped_control (EQ_Q, i)) { if (_strip->mapped_control (EQ_BandQ, 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()); _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_Q, i)); change_message_with_id (X_("/select/eq_q"), i + 1, _strip->mapped_control (EQ_BandQ, i));
} }
if (_strip->mapped_control (EQ_Shape, i)) { if (_strip->mapped_control (EQ_BandShape, 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()); _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_Shape, i)); change_message_with_id (X_("/select/eq_shape"), i + 1, _strip->mapped_control (EQ_BandShape, i));
} }
} }
} }

View file

@ -856,7 +856,7 @@ Strip::setup_trackview_vpot (std::shared_ptr<Stripable> r)
case 9: case 9:
case 10: case 10:
eq_band = (global_pos-8); 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); _vpot->set_mode(Pot::boost_cut);
break; break;
} }
@ -875,14 +875,14 @@ Strip::setup_trackview_vpot (std::shared_ptr<Stripable> r)
case 12: case 12:
case 14: { case 14: {
eq_band = (global_pos-8) / 2; eq_band = (global_pos-8) / 2;
pc = r->mapped_control (EQ_Freq, eq_band); pc = r->mapped_control (EQ_BandFreq, eq_band);
} break; } break;
case 9: case 9:
case 11: case 11:
case 13: case 13:
case 15: { case 15: {
eq_band = (global_pos-8) / 2; 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); _vpot->set_mode(Pot::boost_cut);
} break; } break;
} }

View file

@ -61,14 +61,14 @@ function factory() return function()
local i = 0 local i = 0
repeat repeat
for _,ctrl in pairs({ for _,ctrl in pairs({
route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Freq, i), route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandFreq, i),
route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Gain, i), route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandGain, i),
route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Q, i), route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandQ, i),
}) do }) do
reset(ctrl, disp, auto) reset(ctrl, disp, auto)
end end
i = i + 1 i = i + 1
until route:mapped_control (ARDOUR.WellKnownCtrl.EQ_Freq, i):isnil() until route:mapped_control (ARDOUR.WellKnownCtrl.EQ_BandFreq, i):isnil()
end end
function reset_comp_controls(route, disp, auto) function reset_comp_controls(route, disp, auto)