From 71feea97a0894c07d973713f3c23634ddef2f56d Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Thu, 4 Jun 2015 15:02:51 -0700 Subject: [PATCH] Clean up mackie surface profile editor from things that don't work or match the mackie hardware (fixes #6342) --- libs/surfaces/mackie/button.cc | 174 ++++------- libs/surfaces/mackie/button.h | 73 ++--- .../mackie/mackie_control_protocol.cc | 79 ++--- .../surfaces/mackie/mackie_control_protocol.h | 46 --- libs/surfaces/mackie/mcp_buttons.cc | 287 +----------------- libs/surfaces/mackie/surface.cc | 2 +- mcp/bcf2000_basic_edit_mix.profile | 38 +-- 7 files changed, 143 insertions(+), 556 deletions(-) diff --git a/libs/surfaces/mackie/button.cc b/libs/surfaces/mackie/button.cc index c4f68ebda2..c9ae1f5d71 100644 --- a/libs/surfaces/mackie/button.cc +++ b/libs/surfaces/mackie/button.cc @@ -40,18 +40,18 @@ Button::factory (Surface& surface, Button::ID bid, int id, const std::string& na int Button::name_to_id (const std::string& name) { - if (!g_ascii_strcasecmp (name.c_str(), "IO")) { return IO; } - if (!g_ascii_strcasecmp (name.c_str(), "Sends")) { return Sends; } + if (!g_ascii_strcasecmp (name.c_str(), "Track")) { return Track; } + if (!g_ascii_strcasecmp (name.c_str(), "Send")) { return Send; } if (!g_ascii_strcasecmp (name.c_str(), "Pan")) { return Pan; } if (!g_ascii_strcasecmp (name.c_str(), "Plugin")) { return Plugin; } if (!g_ascii_strcasecmp (name.c_str(), "Eq")) { return Eq; } if (!g_ascii_strcasecmp (name.c_str(), "Dyn")) { return Dyn; } - if (!g_ascii_strcasecmp (name.c_str(), "Left")) { return Left; } - if (!g_ascii_strcasecmp (name.c_str(), "Right")) { return Right; } - if (!g_ascii_strcasecmp (name.c_str(), "ChannelLeft")) { return ChannelLeft; } - if (!g_ascii_strcasecmp (name.c_str(), "ChannelRight")) { return ChannelRight; } + if (!g_ascii_strcasecmp (name.c_str(), "Bank Left")) { return Left; } + if (!g_ascii_strcasecmp (name.c_str(), "Bank Right")) { return Right; } + if (!g_ascii_strcasecmp (name.c_str(), "Channel Left")) { return ChannelLeft; } + if (!g_ascii_strcasecmp (name.c_str(), "Channel Right")) { return ChannelRight; } if (!g_ascii_strcasecmp (name.c_str(), "Flip")) { return Flip; } - if (!g_ascii_strcasecmp (name.c_str(), "Edit")) { return Edit; } + if (!g_ascii_strcasecmp (name.c_str(), "View")) { return View; } if (!g_ascii_strcasecmp (name.c_str(), "Name/Value")) { return NameValue; } if (!g_ascii_strcasecmp (name.c_str(), "Timecode/Beats")) { return TimecodeBeats; } if (!g_ascii_strcasecmp (name.c_str(), "F1")) { return F1; } @@ -62,84 +62,61 @@ Button::name_to_id (const std::string& name) if (!g_ascii_strcasecmp (name.c_str(), "F6")) { return F6; } if (!g_ascii_strcasecmp (name.c_str(), "F7")) { return F7; } if (!g_ascii_strcasecmp (name.c_str(), "F8")) { return F8; } - if (!g_ascii_strcasecmp (name.c_str(), "F9")) { return F9; } - if (!g_ascii_strcasecmp (name.c_str(), "F10")) { return F10; } - if (!g_ascii_strcasecmp (name.c_str(), "F11")) { return F11; } - if (!g_ascii_strcasecmp (name.c_str(), "F12")) { return F12; } - if (!g_ascii_strcasecmp (name.c_str(), "F13")) { return F13; } - if (!g_ascii_strcasecmp (name.c_str(), "F14")) { return F14; } - if (!g_ascii_strcasecmp (name.c_str(), "F15")) { return F15; } - if (!g_ascii_strcasecmp (name.c_str(), "F16")) { return F16; } + if (!g_ascii_strcasecmp (name.c_str(), "Midi Tracks")) { return MidiTracks; } + if (!g_ascii_strcasecmp (name.c_str(), "Inputs")) { return Inputs; } + if (!g_ascii_strcasecmp (name.c_str(), "Audio Tracks")) { return AudioTracks; } + if (!g_ascii_strcasecmp (name.c_str(), "Audio Instruments")) { return AudioInstruments; } + if (!g_ascii_strcasecmp (name.c_str(), "Aux")) { return Aux; } + if (!g_ascii_strcasecmp (name.c_str(), "Busses")) { return Busses; } + if (!g_ascii_strcasecmp (name.c_str(), "Outputs")) { return Outputs; } + if (!g_ascii_strcasecmp (name.c_str(), "User")) { return User; } if (!g_ascii_strcasecmp (name.c_str(), "Shift")) { return Shift; } if (!g_ascii_strcasecmp (name.c_str(), "Option")) { return Option; } if (!g_ascii_strcasecmp (name.c_str(), "Ctrl")) { return Ctrl; } if (!g_ascii_strcasecmp (name.c_str(), "CmdAlt")) { return CmdAlt; } - if (!g_ascii_strcasecmp (name.c_str(), "On")) { return On; } - if (!g_ascii_strcasecmp (name.c_str(), "RecReady")) { return RecReady; } - if (!g_ascii_strcasecmp (name.c_str(), "Undo")) { return Undo; } - if (!g_ascii_strcasecmp (name.c_str(), "Save")) { return Save; } + if (!g_ascii_strcasecmp (name.c_str(), "Read")) { return Read; } + if (!g_ascii_strcasecmp (name.c_str(), "Write")) { return Write; } + if (!g_ascii_strcasecmp (name.c_str(), "Trim")) { return Trim; } if (!g_ascii_strcasecmp (name.c_str(), "Touch")) { return Touch; } - if (!g_ascii_strcasecmp (name.c_str(), "Redo")) { return Redo; } - if (!g_ascii_strcasecmp (name.c_str(), "Marker")) { return Marker; } - if (!g_ascii_strcasecmp (name.c_str(), "Enter")) { return Enter; } + if (!g_ascii_strcasecmp (name.c_str(), "Latch")) { return Latch; } + if (!g_ascii_strcasecmp (name.c_str(), "Group")) { return Grp; } + if (!g_ascii_strcasecmp (name.c_str(), "Save")) { return Save; } + if (!g_ascii_strcasecmp (name.c_str(), "Undo")) { return Undo; } if (!g_ascii_strcasecmp (name.c_str(), "Cancel")) { return Cancel; } - if (!g_ascii_strcasecmp (name.c_str(), "Mixer")) { return Mixer; } - if (!g_ascii_strcasecmp (name.c_str(), "FrmLeft")) { return FrmLeft; } - if (!g_ascii_strcasecmp (name.c_str(), "FrmRight")) { return FrmRight; } + if (!g_ascii_strcasecmp (name.c_str(), "Enter")) { return Enter; } + if (!g_ascii_strcasecmp (name.c_str(), "Marker")) { return Marker; } + if (!g_ascii_strcasecmp (name.c_str(), "Nudge")) { return Nudge; } if (!g_ascii_strcasecmp (name.c_str(), "Loop")) { return Loop; } - if (!g_ascii_strcasecmp (name.c_str(), "PunchIn")) { return PunchIn; } - if (!g_ascii_strcasecmp (name.c_str(), "PunchOut")) { return PunchOut; } - if (!g_ascii_strcasecmp (name.c_str(), "Home")) { return Home; } - if (!g_ascii_strcasecmp (name.c_str(), "End")) { return End; } + if (!g_ascii_strcasecmp (name.c_str(), "Drop")) { return Drop; } + if (!g_ascii_strcasecmp (name.c_str(), "Replace")) { return Replace; } + if (!g_ascii_strcasecmp (name.c_str(), "Click")) { return Click; } + if (!g_ascii_strcasecmp (name.c_str(), "Clear Solo")) { return ClearSolo; } if (!g_ascii_strcasecmp (name.c_str(), "Rewind")) { return Rewind; } if (!g_ascii_strcasecmp (name.c_str(), "Ffwd")) { return Ffwd; } if (!g_ascii_strcasecmp (name.c_str(), "Stop")) { return Stop; } if (!g_ascii_strcasecmp (name.c_str(), "Play")) { return Play; } if (!g_ascii_strcasecmp (name.c_str(), "Record")) { return Record; } - if (!g_ascii_strcasecmp (name.c_str(), "CursorUp")) { return CursorUp; } - if (!g_ascii_strcasecmp (name.c_str(), "CursorDown")) { return CursorDown; } - if (!g_ascii_strcasecmp (name.c_str(), "CursorLeft")) { return CursorLeft; } - if (!g_ascii_strcasecmp (name.c_str(), "CursorRight")) { return CursorRight; } + if (!g_ascii_strcasecmp (name.c_str(), "Cursor Up")) { return CursorUp; } + if (!g_ascii_strcasecmp (name.c_str(), "Cursor Down")) { return CursorDown; } + if (!g_ascii_strcasecmp (name.c_str(), "Cursor Left")) { return CursorLeft; } + if (!g_ascii_strcasecmp (name.c_str(), "Cursor Right")) { return CursorRight; } if (!g_ascii_strcasecmp (name.c_str(), "Zoom")) { return Zoom; } if (!g_ascii_strcasecmp (name.c_str(), "Scrub")) { return Scrub; } - if (!g_ascii_strcasecmp (name.c_str(), "UserA")) { return UserA; } - if (!g_ascii_strcasecmp (name.c_str(), "UserB")) { return UserB; } - if (!g_ascii_strcasecmp (name.c_str(), "Snapshot")) { return Snapshot; } - if (!g_ascii_strcasecmp (name.c_str(), "Read")) { return Read; } - if (!g_ascii_strcasecmp (name.c_str(), "Write")) { return Write; } - if (!g_ascii_strcasecmp (name.c_str(), "FdrGroup")) { return FdrGroup; } - if (!g_ascii_strcasecmp (name.c_str(), "ClearSolo")) { return ClearSolo; } - if (!g_ascii_strcasecmp (name.c_str(), "Track")) { return Track; } - if (!g_ascii_strcasecmp (name.c_str(), "Send")) { return Send; } - if (!g_ascii_strcasecmp (name.c_str(), "MidiTracks")) { return MidiTracks; } - if (!g_ascii_strcasecmp (name.c_str(), "Inputs")) { return Inputs; } - if (!g_ascii_strcasecmp (name.c_str(), "AudioTracks")) { return AudioTracks; } - if (!g_ascii_strcasecmp (name.c_str(), "AudioInstruments")) { return AudioInstruments; } - if (!g_ascii_strcasecmp (name.c_str(), "Aux")) { return Aux; } - if (!g_ascii_strcasecmp (name.c_str(), "Busses")) { return Busses; } - if (!g_ascii_strcasecmp (name.c_str(), "Outputs")) { return Outputs; } - if (!g_ascii_strcasecmp (name.c_str(), "User")) { return User; } - if (!g_ascii_strcasecmp (name.c_str(), "Trim")) { return Trim; } - if (!g_ascii_strcasecmp (name.c_str(), "Latch")) { return Latch; } - if (!g_ascii_strcasecmp (name.c_str(), "Grp")) { return Grp; } - if (!g_ascii_strcasecmp (name.c_str(), "Nudge")) { return Nudge; } - if (!g_ascii_strcasecmp (name.c_str(), "Drop")) { return Drop; } - if (!g_ascii_strcasecmp (name.c_str(), "Replace")) { return Replace; } - if (!g_ascii_strcasecmp (name.c_str(), "Click")) { return Click; } - if (!g_ascii_strcasecmp (name.c_str(), "View")) { return View; } + if (!g_ascii_strcasecmp (name.c_str(), "User A")) { return UserA; } + if (!g_ascii_strcasecmp (name.c_str(), "User B")) { return UserB; } /* Strip buttons */ - if (!g_ascii_strcasecmp (name.c_str(), "RecEnable")) { return RecEnable; } + if (!g_ascii_strcasecmp (name.c_str(), "Record Enable")) { return RecEnable; } if (!g_ascii_strcasecmp (name.c_str(), "Solo")) { return Solo; } if (!g_ascii_strcasecmp (name.c_str(), "Mute")) { return Mute; } if (!g_ascii_strcasecmp (name.c_str(), "Select")) { return Select; } - if (!g_ascii_strcasecmp (name.c_str(), "VSelect")) { return VSelect; } - if (!g_ascii_strcasecmp (name.c_str(), "FaderTouch")) { return FaderTouch; } + if (!g_ascii_strcasecmp (name.c_str(), "V-Pot")) { return VSelect; } + if (!g_ascii_strcasecmp (name.c_str(), "Fader Touch")) { return FaderTouch; } /* Master Fader button */ - if (!g_ascii_strcasecmp (name.c_str(), "MasterFaderTouch")) { return MasterFaderTouch; } + if (!g_ascii_strcasecmp (name.c_str(), "Master Fader Touch")) { return MasterFaderTouch; } return -1; } @@ -147,8 +124,8 @@ Button::name_to_id (const std::string& name) std::string Button::id_to_name (Button::ID id) { - if (id == IO) { return "IO"; } - if (id == Sends) { return "Sends"; } + if (id == Track) { return "Track"; } + if (id == Send) { return "Send"; } if (id == Pan) { return "Pan"; } if (id == Plugin) { return "Plugin"; } if (id == Eq) { return "Eq"; } @@ -158,7 +135,7 @@ Button::id_to_name (Button::ID id) if (id == ChannelLeft) { return "Channel Left"; } if (id == ChannelRight) { return "Channel Right"; } if (id == Flip) { return "Flip"; } - if (id == Edit) { return "Edit"; } + if (id == View) { return "View"; } if (id == NameValue) { return "Name/Value"; } if (id == TimecodeBeats) { return "Timecode/Beats"; } if (id == F1) { return "F1"; } @@ -169,35 +146,35 @@ Button::id_to_name (Button::ID id) if (id == F6) { return "F6"; } if (id == F7) { return "F7"; } if (id == F8) { return "F8"; } - if (id == F9) { return "F9"; } - if (id == F10) { return "F10"; } - if (id == F11) { return "F11"; } - if (id == F12) { return "F12"; } - if (id == F13) { return "F13"; } - if (id == F14) { return "F14"; } - if (id == F15) { return "F15"; } - if (id == F16) { return "F16"; } + if (id == MidiTracks) { return "Midi Tracks"; } + if (id == Inputs) { return "Inputs"; } + if (id == AudioTracks) { return "Audio Tracks"; } + if (id == AudioInstruments) { return "Audio Instruments"; } + if (id == Aux) { return "Aux"; } + if (id == Busses) { return "Busses"; } + if (id == Outputs) { return "Outputs"; } + if (id == User) { return "User"; } if (id == Shift) { return "Shift"; } if (id == Option) { return "Option"; } if (id == Ctrl) { return "Ctrl"; } if (id == CmdAlt) { return "CmdAlt"; } - if (id == On) { return "On"; } - if (id == RecReady) { return "Record"; } - if (id == Undo) { return "Undo"; } - if (id == Save) { return "Save"; } + if (id == Read) { return "Read"; } + if (id == Write) { return "Write"; } + if (id == Trim) { return "Trim"; } if (id == Touch) { return "Touch"; } - if (id == Redo) { return "Redo"; } - if (id == Marker) { return "Marker"; } - if (id == Enter) { return "Enter"; } + if (id == Latch) { return "Latch"; } + if (id == Grp) { return "Group"; } + if (id == Save) { return "Save"; } + if (id == Undo) { return "Undo"; } if (id == Cancel) { return "Cancel"; } - if (id == Mixer) { return "Mixer"; } - if (id == FrmLeft) { return "Frm Left"; } - if (id == FrmRight) { return "Frm Right"; } + if (id == Enter) { return "Enter"; } + if (id == Marker) { return "Marker"; } + if (id == Nudge) { return "Nudge"; } if (id == Loop) { return "Loop"; } - if (id == PunchIn) { return "Punch In"; } - if (id == PunchOut) { return "Punch Out"; } - if (id == Home) { return "Home"; } - if (id == End) { return "End"; } + if (id == Drop) { return "Drop"; } + if (id == Replace) { return "Replace"; } + if (id == Click) { return "Click"; } + if (id == ClearSolo) { return "Clear Solo"; } if (id == Rewind) { return "Rewind"; } if (id == Ffwd) { return "FFwd"; } if (id == Stop) { return "Stop"; } @@ -211,29 +188,6 @@ Button::id_to_name (Button::ID id) if (id == Scrub) { return "Scrub"; } if (id == UserA) { return "User A"; } if (id == UserB) { return "User B"; } - if (id == Snapshot) { return "Snapshot"; } - if (id == Read) { return "Read"; } - if (id == Write) { return "Write"; } - if (id == FdrGroup) { return "Fader Group"; } - if (id == ClearSolo) { return "Clear Solo"; } - if (id == Track) { return "Track"; } - if (id == Send) { return "Send"; } - if (id == MidiTracks) { return "Midi Tracks"; } - if (id == Inputs) { return "Inputs"; } - if (id == AudioTracks) { return "Audio Tracks"; } - if (id == AudioInstruments) { return "Audio Instruments"; } - if (id == Aux) { return "Aux"; } - if (id == Busses) { return "Busses"; } - if (id == Outputs) { return "Outputs"; } - if (id == User) { return "User"; } - if (id == Trim) { return "Trim"; } - if (id == Latch) { return "Latch"; } - if (id == Grp) { return "Group"; } - if (id == Nudge) { return "Nudge"; } - if (id == Drop) { return "Drop"; } - if (id == Replace) { return "Replace"; } - if (id == Click) { return "Click"; } - if (id == View) { return "View"; } if (id == RecEnable) { return "Record Enable"; } if (id == Solo) { return "Solo"; } diff --git a/libs/surfaces/mackie/button.h b/libs/surfaces/mackie/button.h index e836ff9c18..f14060da4b 100644 --- a/libs/surfaces/mackie/button.h +++ b/libs/surfaces/mackie/button.h @@ -40,8 +40,8 @@ public: enum ID { /* Global Buttons */ - IO, - Sends, + Track, + Send, Pan, Plugin, Eq, @@ -51,7 +51,7 @@ public: ChannelLeft, ChannelRight, Flip, - Edit, + View, NameValue, TimecodeBeats, F1, @@ -62,35 +62,35 @@ public: F6, F7, F8, - F9, - F10, - F11, - F12, - F13, - F14, - F15, - F16, + MidiTracks, + Inputs, + AudioTracks, + AudioInstruments, + Aux, + Busses, + Outputs, + User, Shift, Option, Ctrl, CmdAlt, - On, - RecReady, - Undo, - Save, + Read, + Write, + Trim, Touch, - Redo, - Marker, - Enter, + Latch, + Grp, + Save, + Undo, Cancel, - Mixer, - FrmLeft, - FrmRight, + Enter, + Marker, + Nudge, Loop, - PunchIn, - PunchOut, - Home, - End, + Drop, + Replace, + Click, + ClearSolo, Rewind, Ffwd, Stop, @@ -104,29 +104,6 @@ public: Scrub, UserA, UserB, - Snapshot, - Read, - Write, - FdrGroup, - ClearSolo, - Track, - Send, - MidiTracks, - Inputs, - AudioTracks, - AudioInstruments, - Aux, - Busses, - Outputs, - User, - Trim, - Latch, - Grp, - Nudge, - Drop, - Replace, - Click, - View, FinalGlobalButton, diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 76122d1f19..fc036513cc 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -953,9 +953,11 @@ MackieControlProtocol::update_timecode_display() void MackieControlProtocol::notify_parameter_changed (std::string const & p) { if (p == "punch-in") { - update_global_button (Button::PunchIn, session->config.get_punch_in()); + // no such button right now + // update_global_button (Button::PunchIn, session->config.get_punch_in()); } else if (p == "punch-out") { - update_global_button (Button::PunchOut, session->config.get_punch_out()); + // no such button right now + // update_global_button (Button::PunchOut, session->config.get_punch_out()); } else if (p == "clicking") { // update_global_button (Button::RelayClick, Config->get_clicking()); } else { @@ -1148,8 +1150,8 @@ MackieControlProtocol::build_button_map () #define DEFINE_BUTTON_HANDLER(b,p,r) button_map.insert (pair ((b), ButtonHandlers ((p),(r)))); - DEFINE_BUTTON_HANDLER (Button::IO, &MackieControlProtocol::io_press, &MackieControlProtocol::io_release); - DEFINE_BUTTON_HANDLER (Button::Sends, &MackieControlProtocol::sends_press, &MackieControlProtocol::sends_release); + DEFINE_BUTTON_HANDLER (Button::Track, &MackieControlProtocol::track_press, &MackieControlProtocol::track_release); + DEFINE_BUTTON_HANDLER (Button::Send, &MackieControlProtocol::send_press, &MackieControlProtocol::send_release); DEFINE_BUTTON_HANDLER (Button::Pan, &MackieControlProtocol::pan_press, &MackieControlProtocol::pan_release); DEFINE_BUTTON_HANDLER (Button::Plugin, &MackieControlProtocol::plugin_press, &MackieControlProtocol::plugin_release); DEFINE_BUTTON_HANDLER (Button::Eq, &MackieControlProtocol::eq_press, &MackieControlProtocol::eq_release); @@ -1159,7 +1161,7 @@ MackieControlProtocol::build_button_map () DEFINE_BUTTON_HANDLER (Button::ChannelLeft, &MackieControlProtocol::channel_left_press, &MackieControlProtocol::channel_left_release); DEFINE_BUTTON_HANDLER (Button::ChannelRight, &MackieControlProtocol::channel_right_press, &MackieControlProtocol::channel_right_release); DEFINE_BUTTON_HANDLER (Button::Flip, &MackieControlProtocol::flip_press, &MackieControlProtocol::flip_release); - DEFINE_BUTTON_HANDLER (Button::Edit, &MackieControlProtocol::edit_press, &MackieControlProtocol::edit_release); + DEFINE_BUTTON_HANDLER (Button::View, &MackieControlProtocol::view_press, &MackieControlProtocol::view_release); DEFINE_BUTTON_HANDLER (Button::NameValue, &MackieControlProtocol::name_value_press, &MackieControlProtocol::name_value_release); DEFINE_BUTTON_HANDLER (Button::TimecodeBeats, &MackieControlProtocol::timecode_beats_press, &MackieControlProtocol::timecode_beats_release); DEFINE_BUTTON_HANDLER (Button::F1, &MackieControlProtocol::F1_press, &MackieControlProtocol::F1_release); @@ -1170,35 +1172,35 @@ MackieControlProtocol::build_button_map () DEFINE_BUTTON_HANDLER (Button::F6, &MackieControlProtocol::F6_press, &MackieControlProtocol::F6_release); DEFINE_BUTTON_HANDLER (Button::F7, &MackieControlProtocol::F7_press, &MackieControlProtocol::F7_release); DEFINE_BUTTON_HANDLER (Button::F8, &MackieControlProtocol::F8_press, &MackieControlProtocol::F8_release); - DEFINE_BUTTON_HANDLER (Button::F9, &MackieControlProtocol::F9_press, &MackieControlProtocol::F9_release); - DEFINE_BUTTON_HANDLER (Button::F10, &MackieControlProtocol::F10_press, &MackieControlProtocol::F10_release); - DEFINE_BUTTON_HANDLER (Button::F11, &MackieControlProtocol::F11_press, &MackieControlProtocol::F11_release); - DEFINE_BUTTON_HANDLER (Button::F12, &MackieControlProtocol::F12_press, &MackieControlProtocol::F12_release); - DEFINE_BUTTON_HANDLER (Button::F13, &MackieControlProtocol::F13_press, &MackieControlProtocol::F13_release); - DEFINE_BUTTON_HANDLER (Button::F14, &MackieControlProtocol::F14_press, &MackieControlProtocol::F14_release); - DEFINE_BUTTON_HANDLER (Button::F15, &MackieControlProtocol::F15_press, &MackieControlProtocol::F15_release); - DEFINE_BUTTON_HANDLER (Button::F16, &MackieControlProtocol::F16_press, &MackieControlProtocol::F16_release); + DEFINE_BUTTON_HANDLER (Button::MidiTracks, &MackieControlProtocol::miditracks_press, &MackieControlProtocol::miditracks_release); + DEFINE_BUTTON_HANDLER (Button::Inputs, &MackieControlProtocol::inputs_press, &MackieControlProtocol::inputs_release); + DEFINE_BUTTON_HANDLER (Button::AudioTracks, &MackieControlProtocol::audiotracks_press, &MackieControlProtocol::audiotracks_release); + DEFINE_BUTTON_HANDLER (Button::AudioInstruments, &MackieControlProtocol::audioinstruments_press, &MackieControlProtocol::audioinstruments_release); + DEFINE_BUTTON_HANDLER (Button::Aux, &MackieControlProtocol::aux_press, &MackieControlProtocol::aux_release); + DEFINE_BUTTON_HANDLER (Button::Busses, &MackieControlProtocol::busses_press, &MackieControlProtocol::busses_release); + DEFINE_BUTTON_HANDLER (Button::Outputs, &MackieControlProtocol::outputs_press, &MackieControlProtocol::outputs_release); + DEFINE_BUTTON_HANDLER (Button::User, &MackieControlProtocol::user_press, &MackieControlProtocol::user_release); DEFINE_BUTTON_HANDLER (Button::Shift, &MackieControlProtocol::shift_press, &MackieControlProtocol::shift_release); DEFINE_BUTTON_HANDLER (Button::Option, &MackieControlProtocol::option_press, &MackieControlProtocol::option_release); DEFINE_BUTTON_HANDLER (Button::Ctrl, &MackieControlProtocol::control_press, &MackieControlProtocol::control_release); DEFINE_BUTTON_HANDLER (Button::CmdAlt, &MackieControlProtocol::cmd_alt_press, &MackieControlProtocol::cmd_alt_release); - DEFINE_BUTTON_HANDLER (Button::On, &MackieControlProtocol::on_press, &MackieControlProtocol::on_release); - DEFINE_BUTTON_HANDLER (Button::RecReady, &MackieControlProtocol::rec_ready_press, &MackieControlProtocol::rec_ready_release); - DEFINE_BUTTON_HANDLER (Button::Undo, &MackieControlProtocol::undo_press, &MackieControlProtocol::undo_release); - DEFINE_BUTTON_HANDLER (Button::Save, &MackieControlProtocol::save_press, &MackieControlProtocol::save_release); + DEFINE_BUTTON_HANDLER (Button::Read, &MackieControlProtocol::read_press, &MackieControlProtocol::read_release); + DEFINE_BUTTON_HANDLER (Button::Write, &MackieControlProtocol::write_press, &MackieControlProtocol::write_release); + DEFINE_BUTTON_HANDLER (Button::Trim, &MackieControlProtocol::trim_press, &MackieControlProtocol::trim_release); DEFINE_BUTTON_HANDLER (Button::Touch, &MackieControlProtocol::touch_press, &MackieControlProtocol::touch_release); - DEFINE_BUTTON_HANDLER (Button::Redo, &MackieControlProtocol::redo_press, &MackieControlProtocol::redo_release); - DEFINE_BUTTON_HANDLER (Button::Marker, &MackieControlProtocol::marker_press, &MackieControlProtocol::marker_release); - DEFINE_BUTTON_HANDLER (Button::Enter, &MackieControlProtocol::enter_press, &MackieControlProtocol::enter_release); + DEFINE_BUTTON_HANDLER (Button::Latch, &MackieControlProtocol::latch_press, &MackieControlProtocol::latch_release); + DEFINE_BUTTON_HANDLER (Button::Grp, &MackieControlProtocol::grp_press, &MackieControlProtocol::grp_release); + DEFINE_BUTTON_HANDLER (Button::Save, &MackieControlProtocol::save_press, &MackieControlProtocol::save_release); + DEFINE_BUTTON_HANDLER (Button::Undo, &MackieControlProtocol::undo_press, &MackieControlProtocol::undo_release); DEFINE_BUTTON_HANDLER (Button::Cancel, &MackieControlProtocol::cancel_press, &MackieControlProtocol::cancel_release); - DEFINE_BUTTON_HANDLER (Button::Mixer, &MackieControlProtocol::mixer_press, &MackieControlProtocol::mixer_release); - DEFINE_BUTTON_HANDLER (Button::FrmLeft, &MackieControlProtocol::frm_left_press, &MackieControlProtocol::frm_left_release); - DEFINE_BUTTON_HANDLER (Button::FrmRight, &MackieControlProtocol::frm_right_press, &MackieControlProtocol::frm_right_release); + DEFINE_BUTTON_HANDLER (Button::Enter, &MackieControlProtocol::enter_press, &MackieControlProtocol::enter_release); + DEFINE_BUTTON_HANDLER (Button::Marker, &MackieControlProtocol::marker_press, &MackieControlProtocol::marker_release); + DEFINE_BUTTON_HANDLER (Button::Nudge, &MackieControlProtocol::nudge_press, &MackieControlProtocol::nudge_release); DEFINE_BUTTON_HANDLER (Button::Loop, &MackieControlProtocol::loop_press, &MackieControlProtocol::loop_release); - DEFINE_BUTTON_HANDLER (Button::PunchIn, &MackieControlProtocol::punch_in_press, &MackieControlProtocol::punch_in_release); - DEFINE_BUTTON_HANDLER (Button::PunchOut, &MackieControlProtocol::punch_out_press, &MackieControlProtocol::punch_out_release); - DEFINE_BUTTON_HANDLER (Button::Home, &MackieControlProtocol::home_press, &MackieControlProtocol::home_release); - DEFINE_BUTTON_HANDLER (Button::End, &MackieControlProtocol::end_press, &MackieControlProtocol::end_release); + DEFINE_BUTTON_HANDLER (Button::Drop, &MackieControlProtocol::drop_press, &MackieControlProtocol::drop_release); + DEFINE_BUTTON_HANDLER (Button::Replace, &MackieControlProtocol::replace_press, &MackieControlProtocol::replace_release); + DEFINE_BUTTON_HANDLER (Button::Click, &MackieControlProtocol::click_press, &MackieControlProtocol::click_release); + DEFINE_BUTTON_HANDLER (Button::ClearSolo, &MackieControlProtocol::clearsolo_press, &MackieControlProtocol::clearsolo_release); DEFINE_BUTTON_HANDLER (Button::Rewind, &MackieControlProtocol::rewind_press, &MackieControlProtocol::rewind_release); DEFINE_BUTTON_HANDLER (Button::Ffwd, &MackieControlProtocol::ffwd_press, &MackieControlProtocol::ffwd_release); DEFINE_BUTTON_HANDLER (Button::Stop, &MackieControlProtocol::stop_press, &MackieControlProtocol::stop_release); @@ -1214,29 +1216,6 @@ MackieControlProtocol::build_button_map () DEFINE_BUTTON_HANDLER (Button::UserB, &MackieControlProtocol::user_b_press, &MackieControlProtocol::user_b_release); DEFINE_BUTTON_HANDLER (Button::MasterFaderTouch, &MackieControlProtocol::master_fader_touch_press, &MackieControlProtocol::master_fader_touch_release); - DEFINE_BUTTON_HANDLER (Button::Snapshot, &MackieControlProtocol::snapshot_press, &MackieControlProtocol::snapshot_release); - DEFINE_BUTTON_HANDLER (Button::Read, &MackieControlProtocol::read_press, &MackieControlProtocol::read_release); - DEFINE_BUTTON_HANDLER (Button::Write, &MackieControlProtocol::write_press, &MackieControlProtocol::write_release); - DEFINE_BUTTON_HANDLER (Button::FdrGroup, &MackieControlProtocol::fdrgroup_press, &MackieControlProtocol::fdrgroup_release); - DEFINE_BUTTON_HANDLER (Button::ClearSolo, &MackieControlProtocol::clearsolo_press, &MackieControlProtocol::clearsolo_release); - DEFINE_BUTTON_HANDLER (Button::Track, &MackieControlProtocol::track_press, &MackieControlProtocol::track_release); - DEFINE_BUTTON_HANDLER (Button::Send, &MackieControlProtocol::send_press, &MackieControlProtocol::send_release); - DEFINE_BUTTON_HANDLER (Button::MidiTracks, &MackieControlProtocol::miditracks_press, &MackieControlProtocol::miditracks_release); - DEFINE_BUTTON_HANDLER (Button::Inputs, &MackieControlProtocol::inputs_press, &MackieControlProtocol::inputs_release); - DEFINE_BUTTON_HANDLER (Button::AudioTracks, &MackieControlProtocol::audiotracks_press, &MackieControlProtocol::audiotracks_release); - DEFINE_BUTTON_HANDLER (Button::AudioInstruments, &MackieControlProtocol::audioinstruments_press, &MackieControlProtocol::audioinstruments_release); - DEFINE_BUTTON_HANDLER (Button::Aux, &MackieControlProtocol::aux_press, &MackieControlProtocol::aux_release); - DEFINE_BUTTON_HANDLER (Button::Busses, &MackieControlProtocol::busses_press, &MackieControlProtocol::busses_release); - DEFINE_BUTTON_HANDLER (Button::Outputs, &MackieControlProtocol::outputs_press, &MackieControlProtocol::outputs_release); - DEFINE_BUTTON_HANDLER (Button::User, &MackieControlProtocol::user_press, &MackieControlProtocol::user_release); - DEFINE_BUTTON_HANDLER (Button::Trim, &MackieControlProtocol::trim_press, &MackieControlProtocol::trim_release); - DEFINE_BUTTON_HANDLER (Button::Latch, &MackieControlProtocol::latch_press, &MackieControlProtocol::latch_release); - DEFINE_BUTTON_HANDLER (Button::Grp, &MackieControlProtocol::grp_press, &MackieControlProtocol::grp_release); - DEFINE_BUTTON_HANDLER (Button::Nudge, &MackieControlProtocol::nudge_press, &MackieControlProtocol::nudge_release); - DEFINE_BUTTON_HANDLER (Button::Drop, &MackieControlProtocol::drop_press, &MackieControlProtocol::drop_release); - DEFINE_BUTTON_HANDLER (Button::Replace, &MackieControlProtocol::replace_press, &MackieControlProtocol::replace_release); - DEFINE_BUTTON_HANDLER (Button::Click, &MackieControlProtocol::click_press, &MackieControlProtocol::click_release); - DEFINE_BUTTON_HANDLER (Button::View, &MackieControlProtocol::view_press, &MackieControlProtocol::view_release); } void diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index 1e15d8db16..510cbf11ba 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -327,10 +327,6 @@ class MackieControlProtocol void pull_route_range (DownButtonList&, ARDOUR::RouteList&); /* implemented button handlers */ - Mackie::LedState frm_left_press(Mackie::Button &); - Mackie::LedState frm_left_release(Mackie::Button &); - Mackie::LedState frm_right_press(Mackie::Button &); - Mackie::LedState frm_right_release(Mackie::Button &); Mackie::LedState stop_press(Mackie::Button &); Mackie::LedState stop_release(Mackie::Button &); Mackie::LedState play_press(Mackie::Button &); @@ -339,14 +335,6 @@ class MackieControlProtocol Mackie::LedState record_release(Mackie::Button &); Mackie::LedState loop_press(Mackie::Button &); Mackie::LedState loop_release(Mackie::Button &); - Mackie::LedState punch_in_press(Mackie::Button &); - Mackie::LedState punch_in_release(Mackie::Button &); - Mackie::LedState punch_out_press(Mackie::Button &); - Mackie::LedState punch_out_release(Mackie::Button &); - Mackie::LedState home_press(Mackie::Button &); - Mackie::LedState home_release(Mackie::Button &); - Mackie::LedState end_press(Mackie::Button &); - Mackie::LedState end_release(Mackie::Button &); Mackie::LedState rewind_press(Mackie::Button & button); Mackie::LedState rewind_release(Mackie::Button & button); Mackie::LedState ffwd_press(Mackie::Button & button); @@ -383,8 +371,6 @@ class MackieControlProtocol Mackie::LedState scrub_release(Mackie::Button &); Mackie::LedState undo_press (Mackie::Button &); Mackie::LedState undo_release (Mackie::Button &); - Mackie::LedState redo_press (Mackie::Button &); - Mackie::LedState redo_release (Mackie::Button &); Mackie::LedState shift_press (Mackie::Button &); Mackie::LedState shift_release (Mackie::Button &); Mackie::LedState option_press (Mackie::Button &); @@ -394,10 +380,6 @@ class MackieControlProtocol Mackie::LedState cmd_alt_press (Mackie::Button &); Mackie::LedState cmd_alt_release (Mackie::Button &); - Mackie::LedState io_press (Mackie::Button &); - Mackie::LedState io_release (Mackie::Button &); - Mackie::LedState sends_press (Mackie::Button &); - Mackie::LedState sends_release (Mackie::Button &); Mackie::LedState pan_press (Mackie::Button &); Mackie::LedState pan_release (Mackie::Button &); Mackie::LedState plugin_press (Mackie::Button &); @@ -408,8 +390,6 @@ class MackieControlProtocol Mackie::LedState dyn_release (Mackie::Button &); Mackie::LedState flip_press (Mackie::Button &); Mackie::LedState flip_release (Mackie::Button &); - Mackie::LedState edit_press (Mackie::Button &); - Mackie::LedState edit_release (Mackie::Button &); Mackie::LedState name_value_press (Mackie::Button &); Mackie::LedState name_value_release (Mackie::Button &); Mackie::LedState F1_press (Mackie::Button &); @@ -428,34 +408,12 @@ class MackieControlProtocol Mackie::LedState F7_release (Mackie::Button &); Mackie::LedState F8_press (Mackie::Button &); Mackie::LedState F8_release (Mackie::Button &); - Mackie::LedState F9_press (Mackie::Button &); - Mackie::LedState F9_release (Mackie::Button &); - Mackie::LedState F10_press (Mackie::Button &); - Mackie::LedState F10_release (Mackie::Button &); - Mackie::LedState F11_press (Mackie::Button &); - Mackie::LedState F11_release (Mackie::Button &); - Mackie::LedState F12_press (Mackie::Button &); - Mackie::LedState F12_release (Mackie::Button &); - Mackie::LedState F13_press (Mackie::Button &); - Mackie::LedState F13_release (Mackie::Button &); - Mackie::LedState F14_press (Mackie::Button &); - Mackie::LedState F14_release (Mackie::Button &); - Mackie::LedState F15_press (Mackie::Button &); - Mackie::LedState F15_release (Mackie::Button &); - Mackie::LedState F16_press (Mackie::Button &); - Mackie::LedState F16_release (Mackie::Button &); - Mackie::LedState on_press (Mackie::Button &); - Mackie::LedState on_release (Mackie::Button &); - Mackie::LedState rec_ready_press (Mackie::Button &); - Mackie::LedState rec_ready_release (Mackie::Button &); Mackie::LedState touch_press (Mackie::Button &); Mackie::LedState touch_release (Mackie::Button &); Mackie::LedState enter_press (Mackie::Button &); Mackie::LedState enter_release (Mackie::Button &); Mackie::LedState cancel_press (Mackie::Button &); Mackie::LedState cancel_release (Mackie::Button &); - Mackie::LedState mixer_press (Mackie::Button &); - Mackie::LedState mixer_release (Mackie::Button &); Mackie::LedState user_a_press (Mackie::Button &); Mackie::LedState user_a_release (Mackie::Button &); Mackie::LedState user_b_press (Mackie::Button &); @@ -465,14 +423,10 @@ class MackieControlProtocol Mackie::LedState master_fader_touch_press (Mackie::Button &); Mackie::LedState master_fader_touch_release (Mackie::Button &); - Mackie::LedState snapshot_press (Mackie::Button&); - Mackie::LedState snapshot_release (Mackie::Button&); Mackie::LedState read_press (Mackie::Button&); Mackie::LedState read_release (Mackie::Button&); Mackie::LedState write_press (Mackie::Button&); Mackie::LedState write_release (Mackie::Button&); - Mackie::LedState fdrgroup_press (Mackie::Button&); - Mackie::LedState fdrgroup_release (Mackie::Button&); Mackie::LedState clearsolo_press (Mackie::Button&); Mackie::LedState clearsolo_release (Mackie::Button&); Mackie::LedState track_press (Mackie::Button&); diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index 1cb388da48..269d964423 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -343,19 +343,6 @@ MackieControlProtocol::undo_release (Button&) return off; } -LedState -MackieControlProtocol::redo_press (Button&) -{ - Redo(); /* EMIT SIGNAL */ - return off; -} - -LedState -MackieControlProtocol::redo_release (Button&) -{ - return off; -} - LedState MackieControlProtocol::drop_press (Button &) { @@ -431,59 +418,6 @@ MackieControlProtocol::marker_release (Button &) // Transport Buttons ///////////////////////////////////// -LedState -MackieControlProtocol::frm_left_press (Button &) -{ - // can use first_mark_before/after as well - unsigned long elapsed = _frm_left_last.restart(); - - framepos_t pos = session->locations()->first_mark_before (session->transport_frame()); - - // allow a quick double to go past a previous mark - if (session->transport_rolling() && elapsed < 500 && pos >= 0) { - framepos_t pos_two_back = session->locations()->first_mark_before (pos); - if (pos_two_back >= 0) { - pos = pos_two_back; - } - } - - // move to the location, if it's valid - if (pos >= 0) { - session->request_locate (pos, session->transport_rolling()); - } else { - session->request_locate (session->current_start_frame(), session->transport_rolling()); - } - - return on; -} - -LedState -MackieControlProtocol::frm_left_release (Button &) -{ - return off; -} - -LedState -MackieControlProtocol::frm_right_press (Button &) -{ - // can use first_mark_before/after as well - framepos_t pos = session->locations()->first_mark_after (session->transport_frame()); - - if (pos >= 0) { - session->request_locate (pos, session->transport_rolling()); - } else { - session->request_locate (session->current_end_frame(), session->transport_rolling()); - } - - return on; -} - -LedState -MackieControlProtocol::frm_right_release (Button &) -{ - return off; -} - LedState MackieControlProtocol::stop_press (Button &) { @@ -579,60 +513,6 @@ MackieControlProtocol::loop_release (Button &) return none; } -LedState -MackieControlProtocol::punch_in_press (Button &) -{ - bool const state = !session->config.get_punch_in(); - session->config.set_punch_in (state); - return state; -} - -LedState -MackieControlProtocol::punch_in_release (Button &) -{ - return session->config.get_punch_in(); -} - -LedState -MackieControlProtocol::punch_out_press (Button &) -{ - bool const state = !session->config.get_punch_out(); - session->config.set_punch_out (state); - return state; -} - -LedState -MackieControlProtocol::punch_out_release (Button &) -{ - return session->config.get_punch_out(); -} - -LedState -MackieControlProtocol::home_press (Button &) -{ - session->goto_start(); - return on; -} - -LedState -MackieControlProtocol::home_release (Button &) -{ - return off; -} - -LedState -MackieControlProtocol::end_press (Button &) -{ - session->goto_end(); - return on; -} - -LedState -MackieControlProtocol::end_release (Button &) -{ - return off; -} - LedState MackieControlProtocol::clicking_press (Button &) { @@ -756,27 +636,6 @@ MackieControlProtocol::F8_release (Button &) /* UNIMPLEMENTED */ -LedState -MackieControlProtocol::io_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::io_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::sends_press (Button &) -{ - set_view_mode (Sends); - return on; -} -LedState -MackieControlProtocol::sends_release (Button &) -{ - return none; -} LedState MackieControlProtocol::pan_press (Button &) { @@ -835,16 +694,6 @@ MackieControlProtocol::flip_release (Button &) return none; } LedState -MackieControlProtocol::edit_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::edit_release (Button &) -{ - return off; -} -LedState MackieControlProtocol::name_value_press (Button &) { return off; @@ -855,106 +704,6 @@ MackieControlProtocol::name_value_release (Button &) return off; } LedState -MackieControlProtocol::F9_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F9_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F10_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F10_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F11_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F11_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F12_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F12_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F13_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F13_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F14_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F14_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F15_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F15_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F16_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::F16_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::on_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::on_release (Button &) -{ - return off; -} -LedState -MackieControlProtocol::rec_ready_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::rec_ready_release (Button &) -{ - return off; -} -LedState MackieControlProtocol::touch_press (Button &) { return off; @@ -975,16 +724,6 @@ MackieControlProtocol::cancel_release (Button &) return off; } LedState -MackieControlProtocol::mixer_press (Button &) -{ - return off; -} -LedState -MackieControlProtocol::mixer_release (Button &) -{ - return off; -} -LedState MackieControlProtocol::user_a_press (Button &) { transport_play (session->transport_speed() == 1.0); @@ -1034,16 +773,6 @@ MackieControlProtocol::master_fader_touch_release (Mackie::Button &) return none; } -Mackie::LedState -MackieControlProtocol::snapshot_press (Mackie::Button&) -{ - return none; -} -Mackie::LedState -MackieControlProtocol::snapshot_release (Mackie::Button&) -{ - return none; -} Mackie::LedState MackieControlProtocol::read_press (Mackie::Button&) { @@ -1067,16 +796,6 @@ MackieControlProtocol::write_release (Mackie::Button&) return none; } Mackie::LedState -MackieControlProtocol::fdrgroup_press (Mackie::Button&) -{ - return none; -} -Mackie::LedState -MackieControlProtocol::fdrgroup_release (Mackie::Button&) -{ - return none; -} -Mackie::LedState MackieControlProtocol::clearsolo_press (Mackie::Button&) { return none; @@ -1089,6 +808,7 @@ MackieControlProtocol::clearsolo_release (Mackie::Button&) Mackie::LedState MackieControlProtocol::track_press (Mackie::Button&) { + return none; } Mackie::LedState @@ -1099,7 +819,10 @@ MackieControlProtocol::track_release (Mackie::Button&) Mackie::LedState MackieControlProtocol::send_press (Mackie::Button&) { - return none; +// code moved here from "sends_press" + set_view_mode (Sends); + return on; +// return none; } Mackie::LedState MackieControlProtocol::send_release (Mackie::Button&) diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index c513793fee..dc79d5fa27 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -914,7 +914,7 @@ Surface::update_view_mode_display () break; case MackieControlProtocol::Sends: show_two_char_display ("Sn"); - id = Button::Sends; + id = Button::Send; break; case MackieControlProtocol::Plugins: show_two_char_display ("Pl"); diff --git a/mcp/bcf2000_basic_edit_mix.profile b/mcp/bcf2000_basic_edit_mix.profile index e8f6b2ec2f..a18ba9e70e 100644 --- a/mcp/bcf2000_basic_edit_mix.profile +++ b/mcp/bcf2000_basic_edit_mix.profile @@ -5,7 +5,7 @@