LCXL: split track focus button and led code
This commit is contained in:
parent
ed32a00afa
commit
4789147482
@ -22,6 +22,7 @@
|
|||||||
#include "ardour/mute_control.h"
|
#include "ardour/mute_control.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/solo_control.h"
|
#include "ardour/solo_control.h"
|
||||||
|
#include "ardour/solo_isolate_control.h"
|
||||||
|
|
||||||
#include "launch_control_xl.h"
|
#include "launch_control_xl.h"
|
||||||
|
|
||||||
@ -280,7 +281,7 @@ LaunchControlXL::track_button_by_range(uint8_t n, uint8_t first, uint8_t middle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LaunchControlXL::button_track_focus(uint8_t n)
|
LaunchControlXL::update_track_focus_led(uint8_t n)
|
||||||
{
|
{
|
||||||
TrackButton* b = focus_button_by_collumn(n);
|
TrackButton* b = focus_button_by_collumn(n);
|
||||||
|
|
||||||
@ -301,6 +302,22 @@ LaunchControlXL::button_track_focus(uint8_t n)
|
|||||||
write (b->state_msg());
|
write (b->state_msg());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LaunchControlXL::button_track_focus(uint8_t n)
|
||||||
|
{
|
||||||
|
if (stripable[n]) {
|
||||||
|
if ( stripable[n]->is_selected() ) {
|
||||||
|
ControlProtocol::RemoveStripableFromSelection (stripable[n]);
|
||||||
|
} else {
|
||||||
|
ControlProtocol::AddStripableToSelection (stripable[n]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<AutomationControl>
|
boost::shared_ptr<AutomationControl>
|
||||||
LaunchControlXL::get_ac_by_state(uint8_t n) {
|
LaunchControlXL::get_ac_by_state(uint8_t n) {
|
||||||
boost::shared_ptr<AutomationControl> ac;
|
boost::shared_ptr<AutomationControl> ac;
|
||||||
|
@ -811,10 +811,9 @@ LaunchControlXL::stripable_property_change (PropertyChange const& what_changed,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (which < 8) {
|
if (which < 8) {
|
||||||
button_track_focus((uint8_t)which);
|
update_track_focus_led ((uint8_t) which);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -875,7 +874,7 @@ LaunchControlXL::switch_bank (uint32_t base)
|
|||||||
stripable[n]->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::rec_changed, this, n), lcxl);
|
stripable[n]->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::rec_changed, this, n), lcxl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
button_track_focus(n);
|
update_track_focus_led(n);
|
||||||
button_track_mode(track_mode());
|
button_track_mode(track_mode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -469,16 +469,17 @@ private:
|
|||||||
void button_track_control(uint8_t n);
|
void button_track_control(uint8_t n);
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::AutomationControl> get_ac_by_state(uint8_t n);
|
boost::shared_ptr<ARDOUR::AutomationControl> get_ac_by_state(uint8_t n);
|
||||||
|
void update_track_focus_led(uint8_t n);
|
||||||
void update_track_control_led(uint8_t n);
|
void update_track_control_led(uint8_t n);
|
||||||
|
|
||||||
void button_track_focus_1() { ControlProtocol::ToggleStripableSelection (stripable[0]); }
|
void button_track_focus_1() { button_track_focus(0); }
|
||||||
void button_track_focus_2() { ControlProtocol::ToggleStripableSelection (stripable[1]); }
|
void button_track_focus_2() { button_track_focus(1); }
|
||||||
void button_track_focus_3() { ControlProtocol::ToggleStripableSelection (stripable[2]); }
|
void button_track_focus_3() { button_track_focus(2); }
|
||||||
void button_track_focus_4() { ControlProtocol::ToggleStripableSelection (stripable[3]); }
|
void button_track_focus_4() { button_track_focus(3); }
|
||||||
void button_track_focus_5() { ControlProtocol::ToggleStripableSelection (stripable[4]); }
|
void button_track_focus_5() { button_track_focus(4); }
|
||||||
void button_track_focus_6() { ControlProtocol::ToggleStripableSelection (stripable[5]); }
|
void button_track_focus_6() { button_track_focus(5); }
|
||||||
void button_track_focus_7() { ControlProtocol::ToggleStripableSelection (stripable[6]); }
|
void button_track_focus_7() { button_track_focus(6); }
|
||||||
void button_track_focus_8() { ControlProtocol::ToggleStripableSelection (stripable[7]); }
|
void button_track_focus_8() { button_track_focus(7); }
|
||||||
|
|
||||||
void button_track_control_1() { button_track_control(0); }
|
void button_track_control_1() { button_track_control(0); }
|
||||||
void button_track_control_2() { button_track_control(1); }
|
void button_track_control_2() { button_track_control(1); }
|
||||||
|
Loading…
Reference in New Issue
Block a user