light solo button, and do cancel_all_solo() when it is pressed
This commit is contained in:
parent
0e5ac13a04
commit
eadf9bbef1
@ -198,6 +198,17 @@ template<typename T> boost::shared_ptr<ControlList> stripable_list_to_control_li
|
||||
return cl;
|
||||
}
|
||||
|
||||
template<typename T> boost::shared_ptr<ControlList> stripable_list_to_control_list (StripableList& sl, boost::shared_ptr<T> (Stripable::*get_control)() const) {
|
||||
boost::shared_ptr<ControlList> cl (new ControlList);
|
||||
for (StripableList::const_iterator s = sl.begin(); s != sl.end(); ++s) {
|
||||
boost::shared_ptr<AutomationControl> ac = ((*s).get()->*get_control)();
|
||||
if (ac) {
|
||||
cl->push_back (ac);
|
||||
}
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
LIBARDOUR_API std::string CFStringRefToStdString(CFStringRef stringRef);
|
||||
#endif // __APPLE__
|
||||
|
@ -55,3 +55,9 @@ Push2::button_metronome ()
|
||||
{
|
||||
toggle_click ();
|
||||
}
|
||||
|
||||
void
|
||||
Push2::button_solo ()
|
||||
{
|
||||
cancel_all_solo ();
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ Push2::build_maps ()
|
||||
MAKE_COLOR_BUTTON (Lower6, 26);
|
||||
MAKE_COLOR_BUTTON (Lower7, 27);
|
||||
MAKE_COLOR_BUTTON (Mute, 60);
|
||||
MAKE_COLOR_BUTTON (Solo, 61);
|
||||
MAKE_COLOR_BUTTON_PRESS (Solo, 61, &Push2::button_solo);
|
||||
MAKE_COLOR_BUTTON (Stop, 29);
|
||||
MAKE_COLOR_BUTTON (Fwd32ndT, 43);
|
||||
MAKE_COLOR_BUTTON (Fwd32nd,42 );
|
||||
@ -767,7 +767,7 @@ Push2::notify_transport_state_changed ()
|
||||
|
||||
if (session->transport_rolling()) {
|
||||
b->second->set_state (LED::OneShot24th);
|
||||
b->second->set_color (LED::Blue);
|
||||
b->second->set_color (LED::Green);
|
||||
} else {
|
||||
b->second->set_state (LED::Off);
|
||||
}
|
||||
@ -790,7 +790,7 @@ Push2::notify_parameter_changed (std::string param)
|
||||
return;
|
||||
}
|
||||
if (Config->get_clicking()) {
|
||||
b->second->set_state (LED::Pulsing4th);
|
||||
b->second->set_state (LED::Blinking4th);
|
||||
b->second->set_color (LED::White);
|
||||
} else {
|
||||
b->second->set_state (LED::Off);
|
||||
@ -802,15 +802,18 @@ Push2::notify_parameter_changed (std::string param)
|
||||
void
|
||||
Push2::notify_solo_active_changed (bool yn)
|
||||
{
|
||||
IDButtonMap::iterator b = id_button_map.find (Solo);
|
||||
IDButtonMap::iterator b = id_button_map.find (Solo);
|
||||
|
||||
if (b == id_button_map.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (yn) {
|
||||
b->second->set_state (LED::Blinking24th);
|
||||
cerr << "soloing\n";
|
||||
b->second->set_state (LED::Blinking4th);
|
||||
b->second->set_color (LED::Red);
|
||||
} else {
|
||||
cerr << "NOT soloing\n";
|
||||
b->second->set_state (LED::Off);
|
||||
}
|
||||
|
||||
|
@ -331,6 +331,7 @@ class Push2 : public ARDOUR::ControlProtocol
|
||||
void button_left ();
|
||||
void button_metronome ();
|
||||
void button_repeat ();
|
||||
void button_solo ();
|
||||
|
||||
/* widgets */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user