provide limited momentary note on/off MIDI binding option; remove some debugging output; add bank selector to generic MIDI UI

git-svn-id: svn://localhost/ardour2/branches/3.0@6430 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-01-01 18:14:32 +00:00
parent 732ac7756a
commit 6572f421a4
8 changed files with 212 additions and 63 deletions

View file

@ -296,3 +296,98 @@ BasicUI::sample_to_timecode (nframes_t sample, Timecode::Time& timecode, bool us
session->sample_to_timecode (sample, *((Timecode::Time*)&timecode), use_offset, use_subframes);
}
#if 0
this stuff is waiting to go in so that all UI's can offer complex solo/mute functionality
void
BasicUI::solo_release (boost::shared_ptr<Route> r)
{
}
void
BasicUI::solo_press (boost::shared_ptr<Route> r, bool momentary, bool global, bool exclusive, bool isolate, bool solo_group)
{
if (momentary) {
_solo_release = new SoloMuteRelease (_route->soloed());
}
if (global) {
if (_solo_release) {
_solo_release->routes = _session->get_routes ();
}
if (Config->get_solo_control_is_listen_control()) {
_session->set_listen (_session->get_routes(), !_route->listening(), Session::rt_cleanup, true);
} else {
_session->set_solo (_session->get_routes(), !_route->soloed(), Session::rt_cleanup, true);
}
} else if (exclusive) {
if (_solo_release) {
_solo_release->exclusive = true;
boost::shared_ptr<RouteList> routes = _session->get_routes();
for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
if ((*i)->soloed ()) {
_solo_release->routes_on->push_back (*i);
} else {
_solo_release->routes_off->push_back (*i);
}
}
}
if (Config->get_solo_control_is_listen_control()) {
/* ??? we need a just_one_listen() method */
} else {
_session->set_just_one_solo (_route, true);
}
} else if (isolate) {
// shift-click: toggle solo isolated status
_route->set_solo_isolated (!_route->solo_isolated(), this);
delete _solo_release;
_solo_release = 0;
} else if (solo_group) {
/* Primary-button1: solo mix group.
NOTE: Primary-button2 is MIDI learn.
*/
if (_route->route_group()) {
if (_solo_release) {
_solo_release->routes = _route->route_group()->route_list();
}
if (Config->get_solo_control_is_listen_control()) {
_session->set_listen (_route->route_group()->route_list(), !_route->listening(), Session::rt_cleanup, true);
} else {
_session->set_solo (_route->route_group()->route_list(), !_route->soloed(), Session::rt_cleanup, true);
}
}
} else {
/* click: solo this route */
boost::shared_ptr<RouteList> rl (new RouteList);
rl->push_back (route());
if (_solo_release) {
_solo_release->routes = rl;
}
if (Config->get_solo_control_is_listen_control()) {
_session->set_listen (rl, !_route->listening());
} else {
_session->set_solo (rl, !_route->soloed());
}
}
}
#endif