diff options
-rw-r--r-- | libs/surfaces/mackie/bcf_surface_generated.cc | 39 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_button_handler.cc | 20 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_button_handler.h | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 37 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 10 | ||||
-rw-r--r-- | libs/surfaces/mackie/route_signal.cc | 5 | ||||
-rw-r--r-- | libs/surfaces/mackie/scripts/bcf-controls.csv | 5 | ||||
-rw-r--r-- | manual/xml/mackie.xml | 20 |
8 files changed, 123 insertions, 19 deletions
diff --git a/libs/surfaces/mackie/bcf_surface_generated.cc b/libs/surfaces/mackie/bcf_surface_generated.cc index 9ac144b8b5..f1d8d7ab7b 100644 --- a/libs/surfaces/mackie/bcf_surface_generated.cc +++ b/libs/surfaces/mackie/bcf_surface_generated.cc @@ -41,12 +41,12 @@ void Mackie::BcfSurface::init_controls() groups["strip_2"] = group; strips[1] = dynamic_cast<Strip*>( group ); - group = new Group ( "functions" ); - groups["functions"] = group; - group = new Group ( "automation" ); groups["automation"] = group; + group = new Group ( "functions" ); + groups["functions"] = group; + group = new Strip ( "strip_3", 2 ); groups["strip_3"] = group; strips[2] = dynamic_cast<Strip*>( group ); @@ -428,11 +428,11 @@ void Mackie::BcfSurface::init_controls() controls_by_name["plugin"] = button; group->add( *button ); - group = groups["assignment"]; - button = new Button ( 88, 1, "eq", *group ); + group = groups["functions"]; + button = new Button ( 88, 1, "drop", *group ); buttons[0x58] = button; controls.push_back( button ); - controls_by_name["eq"] = button; + controls_by_name["drop"] = button; group->add( *button ); group = groups["assignment"]; @@ -653,8 +653,8 @@ void Mackie::BcfSurface::init_controls() group->add( *button ); group = groups["automation"]; - button = new Button ( 77, 1, "snapshot", *group ); - buttons[0x4d] = button; + button = new Button ( 95, 1, "snapshot", *group ); + buttons[0x5f] = button; controls.push_back( button ); controls_by_name["snapshot"] = button; group->add( *button ); @@ -694,6 +694,13 @@ void Mackie::BcfSurface::init_controls() controls_by_name["mixer"] = button; group->add( *button ); + group = groups["functions"]; + button = new Button ( 77, 1, "save", *group ); + buttons[0x4d] = button; + controls.push_back( button ); + controls_by_name["save"] = button; + group->add( *button ); + group = groups["transport"]; button = new Button ( 91, 1, "frm_left", *group ); buttons[0x5b] = button; @@ -969,10 +976,10 @@ void Mackie::BcfSurface::handle_button( MackieButtonHandler & mbh, ButtonState b } break; - case 0x9058: // eq + case 0x9058: // drop switch ( bs ) { - case press: ls = mbh.eq_press( button ); break; - case release: ls = mbh.eq_release( button ); break; + case press: ls = mbh.drop_press( button ); break; + case release: ls = mbh.drop_release( button ); break; case neither: break; } break; @@ -1225,7 +1232,7 @@ void Mackie::BcfSurface::handle_button( MackieButtonHandler & mbh, ButtonState b } break; - case 0x904d: // snapshot + case 0x905f: // snapshot switch ( bs ) { case press: ls = mbh.snapshot_press( button ); break; case release: ls = mbh.snapshot_release( button ); break; @@ -1273,6 +1280,14 @@ void Mackie::BcfSurface::handle_button( MackieButtonHandler & mbh, ButtonState b } break; + case 0x904d: // save + switch ( bs ) { + case press: ls = mbh.save_press( button ); break; + case release: ls = mbh.save_release( button ); break; + case neither: break; + } + break; + case 0x905b: // frm_left switch ( bs ) { case press: ls = mbh.frm_left_press( button ); break; diff --git a/libs/surfaces/mackie/mackie_button_handler.cc b/libs/surfaces/mackie/mackie_button_handler.cc index f7ac2ab6d5..2db07beabd 100644 --- a/libs/surfaces/mackie/mackie_button_handler.cc +++ b/libs/surfaces/mackie/mackie_button_handler.cc @@ -689,3 +689,23 @@ LedState MackieButtonHandler::global_solo_release( Button & button ) { return default_button_press( button ); } + +LedState MackieButtonHandler::drop_press( Button & button ) +{ + return default_button_press( button ); +} + +LedState MackieButtonHandler::drop_release( Button & button ) +{ + return default_button_press( button ); +} + +LedState MackieButtonHandler::save_press( Button & button ) +{ + return default_button_press( button ); +} + +LedState MackieButtonHandler::save_release( Button & button ) +{ + return default_button_press( button ); +} diff --git a/libs/surfaces/mackie/mackie_button_handler.h b/libs/surfaces/mackie/mackie_button_handler.h index ee4187c7ce..2e8bc649be 100644 --- a/libs/surfaces/mackie/mackie_button_handler.h +++ b/libs/surfaces/mackie/mackie_button_handler.h @@ -220,6 +220,12 @@ public: virtual LedState global_solo_press( Button & ); virtual LedState global_solo_release( Button & ); + + virtual LedState drop_press( Button & ); + virtual LedState drop_release( Button & ); + + virtual LedState save_press( Button & ); + virtual LedState save_release( Button & ); }; } diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 22cae963d5..7d6bb75fc3 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -954,6 +954,21 @@ void MackieControlProtocol::notify_record_enable_changed( RouteSignal * route_si } } +void MackieControlProtocol::notify_active_changed( RouteSignal * route_signal ) +{ + try + { +#ifdef DEBUG + cout << "MackieControlProtocol::notify_active_changed" << endl; +#endif + refresh_current_bank(); + } + catch( exception & e ) + { + cout << e.what() << endl; + } +} + void MackieControlProtocol::notify_gain_changed( RouteSignal * route_signal, bool force_update ) { try @@ -1546,3 +1561,25 @@ Mackie::LedState MackieControlProtocol::scrub_release( Mackie::Button & ) _jog_wheel.jog_wheel_state() == JogWheel::shuttle ; } + +LedState MackieControlProtocol::drop_press( Button & button ) +{ + session->remove_last_capture(); + return on; +} + +LedState MackieControlProtocol::drop_release( Button & button ) +{ + return off; +} + +LedState MackieControlProtocol::save_press( Button & button ) +{ + session->save_state( "" ); + return on; +} + +LedState MackieControlProtocol::save_release( Button & button ) +{ + return off; +} diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index dd81213b33..c3e79b846f 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -102,7 +102,9 @@ class MackieControlProtocol void notify_panner_changed( Mackie::RouteSignal *, bool force_update = true ); /// Signal handler for new routes added void notify_route_added( ARDOUR::Session::RouteList & ); - + /// Signal handler for Route::active_changed + void notify_active_changed( Mackie::RouteSignal * ); + void notify_remote_id_changed(); /// rebuild the current bank. Called on route added/removed and @@ -185,6 +187,12 @@ class MackieControlProtocol virtual Mackie::LedState marker_press( Mackie::Button & ); virtual Mackie::LedState marker_release( Mackie::Button & ); + virtual Mackie::LedState drop_press( Mackie::Button & ); + virtual Mackie::LedState drop_release( Mackie::Button & ); + + virtual Mackie::LedState save_press( Mackie::Button & ); + virtual Mackie::LedState save_release( Mackie::Button & ); + // jog wheel states virtual Mackie::LedState zoom_press( Mackie::Button & ); virtual Mackie::LedState zoom_release( Mackie::Button & ); diff --git a/libs/surfaces/mackie/route_signal.cc b/libs/surfaces/mackie/route_signal.cc index 832a8843a8..7822c7c0f1 100644 --- a/libs/surfaces/mackie/route_signal.cc +++ b/libs/surfaces/mackie/route_signal.cc @@ -63,8 +63,11 @@ void RouteSignal::connect() // with can't be record-enabled } + // TODO this works when a currently-banked route is made inactive, but not + // when a route is activated which should be currently banked. + cins = _route.active_changed.connect( sigc::bind ( mem_fun ( _mcp, &MackieControlProtocol::notify_active_changed ), this ) ); + // TODO - // active_changed // SelectedChanged // RemoteControlIDChanged. Better handled at Session level. } diff --git a/libs/surfaces/mackie/scripts/bcf-controls.csv b/libs/surfaces/mackie/scripts/bcf-controls.csv index 32d0dbb9a9..4dd3bfdd28 100644 --- a/libs/surfaces/mackie/scripts/bcf-controls.csv +++ b/libs/surfaces/mackie/scripts/bcf-controls.csv @@ -20,7 +20,7 @@ button,1,assignment,io,1,1,0x28 button,1,assignment,sends,1,1,0x5a button,1,assignment,pan,1,1,0x59 button,1,assignment,plugin,1,1,0x57 -button,1,assignment,eq,1,1,0x58 +button,1,functions,drop,1,1,0x58 # was eq button,1,assignment,zoom,1,1,0x2d button,1,bank,left,1,0,0x2e button,1,bank,right,1,0,0x2f @@ -54,12 +54,13 @@ button,1,modifiers,cmd_alt,1,0,0x49 button,1,automation,on,1,1,0x4a button,1,automation,rec_ready,1,1,0x4b button,1,functions,undo,1,1,0x4c -button,1,automation,snapshot,1,1,0x4d +button,1,automation,snapshot,1,1,0x5f button,1,functions,redo,1,1,0x4f button,1,functions,marker,1,1,0x47 button,1,functions,enter,1,1,0x51 button,1,functions,cancel,1,0,0x52 button,1,functions,mixer,1,0,0x53 +button,1,functions,save,1,0,0x4d # transport buttons button,1,transport,frm_left,1,1,0x5b diff --git a/manual/xml/mackie.xml b/manual/xml/mackie.xml index d819076151..2a0ed49dff 100644 --- a/manual/xml/mackie.xml +++ b/manual/xml/mackie.xml @@ -292,7 +292,13 @@ KERNEL=="midiC[0-9]D0", ATTRS{product}=="BCF2000", SYMLINK+="midi-bcf2000" </entry> <entry> - end + <para> + end + </para> + + <para> + shift 2: save + </para> </entry> </row> @@ -330,11 +336,19 @@ KERNEL=="midiC[0-9]D0", ATTRS{product}=="BCF2000", SYMLINK+="midi-bcf2000" <row> <entry> - stop + <para> + stop + </para> + + <para> + shift 1: remove last capture + </para> </entry> <entry> - play + <para> + play + </para> </entry> </row> </tbody> |