remove redundant MackieButtonHandler class, implement initial zoom support for cursor left + right buttons
git-svn-id: svn://localhost/ardour2/branches/3.0@11847 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f02edae438
commit
2b659deaef
@ -30,6 +30,73 @@ class Surface;
|
||||
class Button : public Control
|
||||
{
|
||||
public:
|
||||
enum ButtonID {
|
||||
ButtonIo = 0x28,
|
||||
ButtonSends = 0x29,
|
||||
ButtonPan = 0x2a,
|
||||
ButtonPlugin = 0x2b,
|
||||
ButtonEq = 0x2c,
|
||||
ButtonDyn = 0x2d,
|
||||
ButtonLeft = 0x2e,
|
||||
ButtonRight = 0x2f,
|
||||
ButtonChannelLeft = 0x30,
|
||||
ButtonChannelRight = 0x31,
|
||||
ButtonFlip = 0x32,
|
||||
ButtonEdit = 0x33,
|
||||
ButtonNameValue = 0x34,
|
||||
ButtonTimecodeBeats = 0x35,
|
||||
ButtonF1 = 0x36,
|
||||
ButtonF2 = 0x37,
|
||||
ButtonF3 = 0x38,
|
||||
ButtonF4 = 0x39,
|
||||
ButtonF5 = 0x3a,
|
||||
ButtonF6 = 0x3b,
|
||||
ButtonF7 = 0x3c,
|
||||
ButtonF8 = 0x3d,
|
||||
ButtonF9 = 0x3e,
|
||||
ButtonF10 = 0x3f,
|
||||
ButtonF11 = 0x40,
|
||||
ButtonF12 = 0x41,
|
||||
ButtonF13 = 0x42,
|
||||
ButtonF14 = 0x43,
|
||||
ButtonF15 = 0x44,
|
||||
ButtonF16 = 0x45,
|
||||
ButtonShift = 0x46,
|
||||
ButtonOption = 0x47,
|
||||
ButtonControl = 0x48,
|
||||
ButtonCmdAlt = 0x49,
|
||||
ButtonOn = 0x4a,
|
||||
ButtonRecReady = 0x4b,
|
||||
ButtonUndo = 0x4c,
|
||||
ButtonSnapshot = 0x4d,
|
||||
ButtonTouch = 0x4e,
|
||||
ButtonRedo = 0x4f,
|
||||
ButtonMarker = 0x50,
|
||||
ButtonEnter = 0x51,
|
||||
ButtonCancel = 0x52,
|
||||
ButtonMixer = 0x53,
|
||||
ButtonFrmLeft = 0x54,
|
||||
ButtonFrmRight = 0x55,
|
||||
ButtonLoop = 0x56,
|
||||
ButtonPunchIn = 0x57,
|
||||
ButtonPunchOut = 0x58,
|
||||
ButtonHome = 0x59,
|
||||
ButtonEnd = 0x5a,
|
||||
ButtonRewind = 0x5b,
|
||||
ButtonFfwd = 0x5c,
|
||||
ButtonStop = 0x5d,
|
||||
ButtonPlay = 0x5e,
|
||||
ButtonRecord = 0x5f,
|
||||
ButtonCursorUp = 0x60,
|
||||
ButtonCursorDown = 0x61,
|
||||
ButtonCursorLeft = 0x62,
|
||||
ButtonCursorRight = 0x63,
|
||||
ButtonZoom = 0x64,
|
||||
ButtonScrub = 0x65,
|
||||
ButtonUserA = 0x66,
|
||||
ButtonUserB = 0x67,
|
||||
};
|
||||
|
||||
Button (int id, int ordinal, std::string name, Group & group)
|
||||
: Control (id, ordinal, name, group)
|
||||
, _led (id, ordinal, name + "_led", group) {}
|
||||
|
@ -1,718 +0,0 @@
|
||||
/*
|
||||
Generated by scripts/generate-button-handlers.erb
|
||||
*/
|
||||
#include "mackie_button_handler.h"
|
||||
#include "controls.h"
|
||||
#include "button.h"
|
||||
#include "led.h"
|
||||
#include "ledring.h"
|
||||
#include "pot.h"
|
||||
#include "fader.h"
|
||||
#include "jog.h"
|
||||
#include "meter.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace Mackie;
|
||||
|
||||
LedState MackieButtonHandler::default_button_press( Button & button )
|
||||
{
|
||||
cout << "press: " << button << endl;
|
||||
return on;
|
||||
}
|
||||
LedState MackieButtonHandler::default_button_release( Button & button )
|
||||
{
|
||||
cout << "release: " << button << endl;
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::io_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::io_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::sends_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::sends_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::pan_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::pan_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::plugin_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::plugin_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::eq_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::eq_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::dyn_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::dyn_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::left_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::left_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::right_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::right_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::channel_left_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::channel_left_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::channel_right_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::channel_right_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::flip_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::flip_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::edit_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::edit_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::name_value_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::name_value_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::timecode_beats_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::timecode_beats_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F1_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F1_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F2_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F2_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F3_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F3_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F4_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F4_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F5_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F5_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F6_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F6_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F7_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F7_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F8_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F8_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F9_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F9_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F10_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F10_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F11_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F11_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F12_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F12_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F13_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F13_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F14_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F14_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F15_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F15_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F16_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::F16_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::shift_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::shift_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::option_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::option_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::control_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::control_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cmd_alt_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cmd_alt_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::on_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::on_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::rec_ready_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::rec_ready_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::undo_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::undo_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::snapshot_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::snapshot_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::touch_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::touch_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::redo_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::redo_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::marker_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::marker_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::enter_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::enter_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cancel_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cancel_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::mixer_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::mixer_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::frm_left_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::frm_left_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::frm_right_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::frm_right_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::loop_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::loop_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::punch_in_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::punch_in_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::punch_out_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::punch_out_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::home_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::home_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::end_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::end_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::rewind_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::rewind_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::ffwd_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::ffwd_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::stop_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::stop_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::play_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::play_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::record_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::record_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_up_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_up_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_down_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_down_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_left_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_left_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_right_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::cursor_right_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::zoom_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::zoom_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::scrub_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::scrub_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::user_a_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::user_a_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::user_b_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::user_b_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::fader_touch_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::fader_touch_release( Button & button )
|
||||
{
|
||||
return default_button_release( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::clicking_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::clicking_release( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
LedState MackieButtonHandler::global_solo_press( Button & button )
|
||||
{
|
||||
return default_button_press( button );
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
@ -1,233 +0,0 @@
|
||||
#ifndef mackie_button_handler_h
|
||||
#define mackie_button_handler_h
|
||||
/*
|
||||
Generated by scripts/generate-button-handlers.erb
|
||||
*/
|
||||
|
||||
#include "types.h"
|
||||
|
||||
namespace Mackie
|
||||
{
|
||||
|
||||
class MackieButtonHandler
|
||||
{
|
||||
public:
|
||||
virtual ~MackieButtonHandler() {}
|
||||
|
||||
virtual LedState default_button_press( Button & button );
|
||||
virtual LedState default_button_release( Button & button );
|
||||
|
||||
virtual void update_led( Button & button, LedState ls ) = 0;
|
||||
|
||||
|
||||
virtual LedState io_press( Button & );
|
||||
virtual LedState io_release( Button & );
|
||||
|
||||
virtual LedState sends_press( Button & );
|
||||
virtual LedState sends_release( Button & );
|
||||
|
||||
virtual LedState pan_press( Button & );
|
||||
virtual LedState pan_release( Button & );
|
||||
|
||||
virtual LedState plugin_press( Button & );
|
||||
virtual LedState plugin_release( Button & );
|
||||
|
||||
virtual LedState eq_press( Button & );
|
||||
virtual LedState eq_release( Button & );
|
||||
|
||||
virtual LedState dyn_press( Button & );
|
||||
virtual LedState dyn_release( Button & );
|
||||
|
||||
virtual LedState left_press( Button & );
|
||||
virtual LedState left_release( Button & );
|
||||
|
||||
virtual LedState right_press( Button & );
|
||||
virtual LedState right_release( Button & );
|
||||
|
||||
virtual LedState channel_left_press( Button & );
|
||||
virtual LedState channel_left_release( Button & );
|
||||
|
||||
virtual LedState channel_right_press( Button & );
|
||||
virtual LedState channel_right_release( Button & );
|
||||
|
||||
virtual LedState flip_press( Button & );
|
||||
virtual LedState flip_release( Button & );
|
||||
|
||||
virtual LedState edit_press( Button & );
|
||||
virtual LedState edit_release( Button & );
|
||||
|
||||
virtual LedState name_value_press( Button & );
|
||||
virtual LedState name_value_release( Button & );
|
||||
|
||||
virtual LedState timecode_beats_press( Button & );
|
||||
virtual LedState timecode_beats_release( Button & );
|
||||
|
||||
virtual LedState F1_press( Button & );
|
||||
virtual LedState F1_release( Button & );
|
||||
|
||||
virtual LedState F2_press( Button & );
|
||||
virtual LedState F2_release( Button & );
|
||||
|
||||
virtual LedState F3_press( Button & );
|
||||
virtual LedState F3_release( Button & );
|
||||
|
||||
virtual LedState F4_press( Button & );
|
||||
virtual LedState F4_release( Button & );
|
||||
|
||||
virtual LedState F5_press( Button & );
|
||||
virtual LedState F5_release( Button & );
|
||||
|
||||
virtual LedState F6_press( Button & );
|
||||
virtual LedState F6_release( Button & );
|
||||
|
||||
virtual LedState F7_press( Button & );
|
||||
virtual LedState F7_release( Button & );
|
||||
|
||||
virtual LedState F8_press( Button & );
|
||||
virtual LedState F8_release( Button & );
|
||||
|
||||
virtual LedState F9_press( Button & );
|
||||
virtual LedState F9_release( Button & );
|
||||
|
||||
virtual LedState F10_press( Button & );
|
||||
virtual LedState F10_release( Button & );
|
||||
|
||||
virtual LedState F11_press( Button & );
|
||||
virtual LedState F11_release( Button & );
|
||||
|
||||
virtual LedState F12_press( Button & );
|
||||
virtual LedState F12_release( Button & );
|
||||
|
||||
virtual LedState F13_press( Button & );
|
||||
virtual LedState F13_release( Button & );
|
||||
|
||||
virtual LedState F14_press( Button & );
|
||||
virtual LedState F14_release( Button & );
|
||||
|
||||
virtual LedState F15_press( Button & );
|
||||
virtual LedState F15_release( Button & );
|
||||
|
||||
virtual LedState F16_press( Button & );
|
||||
virtual LedState F16_release( Button & );
|
||||
|
||||
virtual LedState shift_press( Button & );
|
||||
virtual LedState shift_release( Button & );
|
||||
|
||||
virtual LedState option_press( Button & );
|
||||
virtual LedState option_release( Button & );
|
||||
|
||||
virtual LedState control_press( Button & );
|
||||
virtual LedState control_release( Button & );
|
||||
|
||||
virtual LedState cmd_alt_press( Button & );
|
||||
virtual LedState cmd_alt_release( Button & );
|
||||
|
||||
virtual LedState on_press( Button & );
|
||||
virtual LedState on_release( Button & );
|
||||
|
||||
virtual LedState rec_ready_press( Button & );
|
||||
virtual LedState rec_ready_release( Button & );
|
||||
|
||||
virtual LedState undo_press( Button & );
|
||||
virtual LedState undo_release( Button & );
|
||||
|
||||
virtual LedState snapshot_press( Button & );
|
||||
virtual LedState snapshot_release( Button & );
|
||||
|
||||
virtual LedState touch_press( Button & );
|
||||
virtual LedState touch_release( Button & );
|
||||
|
||||
virtual LedState redo_press( Button & );
|
||||
virtual LedState redo_release( Button & );
|
||||
|
||||
virtual LedState marker_press( Button & );
|
||||
virtual LedState marker_release( Button & );
|
||||
|
||||
virtual LedState enter_press( Button & );
|
||||
virtual LedState enter_release( Button & );
|
||||
|
||||
virtual LedState cancel_press( Button & );
|
||||
virtual LedState cancel_release( Button & );
|
||||
|
||||
virtual LedState mixer_press( Button & );
|
||||
virtual LedState mixer_release( Button & );
|
||||
|
||||
virtual LedState frm_left_press( Button & );
|
||||
virtual LedState frm_left_release( Button & );
|
||||
|
||||
virtual LedState frm_right_press( Button & );
|
||||
virtual LedState frm_right_release( Button & );
|
||||
|
||||
virtual LedState loop_press( Button & );
|
||||
virtual LedState loop_release( Button & );
|
||||
|
||||
virtual LedState punch_in_press( Button & );
|
||||
virtual LedState punch_in_release( Button & );
|
||||
|
||||
virtual LedState punch_out_press( Button & );
|
||||
virtual LedState punch_out_release( Button & );
|
||||
|
||||
virtual LedState home_press( Button & );
|
||||
virtual LedState home_release( Button & );
|
||||
|
||||
virtual LedState end_press( Button & );
|
||||
virtual LedState end_release( Button & );
|
||||
|
||||
virtual LedState rewind_press( Button & );
|
||||
virtual LedState rewind_release( Button & );
|
||||
|
||||
virtual LedState ffwd_press( Button & );
|
||||
virtual LedState ffwd_release( Button & );
|
||||
|
||||
virtual LedState stop_press( Button & );
|
||||
virtual LedState stop_release( Button & );
|
||||
|
||||
virtual LedState play_press( Button & );
|
||||
virtual LedState play_release( Button & );
|
||||
|
||||
virtual LedState record_press( Button & );
|
||||
virtual LedState record_release( Button & );
|
||||
|
||||
virtual LedState cursor_up_press( Button & );
|
||||
virtual LedState cursor_up_release( Button & );
|
||||
|
||||
virtual LedState cursor_down_press( Button & );
|
||||
virtual LedState cursor_down_release( Button & );
|
||||
|
||||
virtual LedState cursor_left_press( Button & );
|
||||
virtual LedState cursor_left_release( Button & );
|
||||
|
||||
virtual LedState cursor_right_press( Button & );
|
||||
virtual LedState cursor_right_release( Button & );
|
||||
|
||||
virtual LedState zoom_press( Button & );
|
||||
virtual LedState zoom_release( Button & );
|
||||
|
||||
virtual LedState scrub_press( Button & );
|
||||
virtual LedState scrub_release( Button & );
|
||||
|
||||
virtual LedState user_a_press( Button & );
|
||||
virtual LedState user_a_release( Button & );
|
||||
|
||||
virtual LedState user_b_press( Button & );
|
||||
virtual LedState user_b_release( Button & );
|
||||
|
||||
virtual LedState fader_touch_press( Button & );
|
||||
virtual LedState fader_touch_release( Button & );
|
||||
|
||||
virtual LedState clicking_press( Button & );
|
||||
virtual LedState clicking_release( Button & );
|
||||
|
||||
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 & );
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -100,6 +100,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
|
||||
, _input_bundle (new ARDOUR::Bundle (_("Mackie Control In"), true))
|
||||
, _output_bundle (new ARDOUR::Bundle (_("Mackie Control Out"), false))
|
||||
, _gui (0)
|
||||
, _zoom_mode (false)
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::MackieControlProtocol\n");
|
||||
|
||||
@ -500,24 +501,6 @@ MackieControlProtocol::handle_strip_button (SurfacePort & port, Control & contro
|
||||
return state;
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::update_led (Mackie::Button & button, Mackie::LedState ls)
|
||||
{
|
||||
if (ls != none) {
|
||||
SurfacePort * port = 0;
|
||||
if (button.group().is_strip()) {
|
||||
if (button.group().is_master()) {
|
||||
port = &mcu_port();
|
||||
} else {
|
||||
port = &port_for_id (dynamic_cast<const Strip&> (button.group()).index());
|
||||
}
|
||||
} else {
|
||||
port = &mcu_port();
|
||||
}
|
||||
port->write (builder.build_led (button, ls));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::update_timecode_beats_led()
|
||||
{
|
||||
@ -886,7 +869,8 @@ MackieControlProtocol::handle_control_event (SurfacePort & port, Control & contr
|
||||
} else {
|
||||
// handle all non-strip buttons
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("global button %1\n", control.id()));
|
||||
surface().handle_button (*this, state.button_state, dynamic_cast<Button&> (control));
|
||||
handle_button_event (dynamic_cast<Button&>(control), state.button_state);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1503,9 +1487,6 @@ MackieControlProtocol::notify_transport_state_changed()
|
||||
mcu_port().write (builder.build_led (*rec, record_release (*rec)));
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
// Bank Switching
|
||||
/////////////////////////////////////
|
||||
LedState
|
||||
MackieControlProtocol::left_press (Button &)
|
||||
{
|
||||
@ -1536,27 +1517,81 @@ MackieControlProtocol::left_release (Button &)
|
||||
LedState
|
||||
MackieControlProtocol::right_press (Button &)
|
||||
{
|
||||
Sorted sorted = get_sorted_routes();
|
||||
if (sorted.size() > route_table.size()) {
|
||||
uint32_t delta = sorted.size() - (route_table.size() + _current_initial_bank);
|
||||
|
||||
if (delta > route_table.size()) {
|
||||
delta = route_table.size();
|
||||
}
|
||||
|
||||
if (delta > 0) {
|
||||
session->set_dirty();
|
||||
switch_banks (_current_initial_bank + delta);
|
||||
}
|
||||
|
||||
return on;
|
||||
} else {
|
||||
return flashing;
|
||||
}
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::right_release (Button &)
|
||||
{
|
||||
if (_zoom_mode) {
|
||||
|
||||
}
|
||||
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_left_press (Button& )
|
||||
{
|
||||
if (_zoom_mode) {
|
||||
|
||||
if (false) { // button_down (BUTTON_OPTION)) {
|
||||
/* reset selected tracks to default vertical zoom */
|
||||
} else {
|
||||
ZoomOut (); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_left_release (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_right_press (Button& )
|
||||
{
|
||||
if (_zoom_mode) {
|
||||
|
||||
if (false) { // button_down (BUTTON_OPTION)) {
|
||||
/* reset selected tracks to default vertical zoom */
|
||||
} else {
|
||||
ZoomOut (); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_right_release (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_up_press (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_up_release (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_down_press (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::cursor_down_release (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
@ -1651,16 +1686,16 @@ jog_wheel_state_display (JogWheel::State state, SurfacePort & port)
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::zoom_press (Mackie::Button &)
|
||||
{
|
||||
_jog_wheel.zoom_state_toggle();
|
||||
update_global_button ("scrub", _jog_wheel.jog_wheel_state() == JogWheel::scrub);
|
||||
jog_wheel_state_display (_jog_wheel.jog_wheel_state(), mcu_port());
|
||||
return _jog_wheel.jog_wheel_state() == JogWheel::zoom;
|
||||
_zoom_mode = true;
|
||||
return on;
|
||||
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
MackieControlProtocol::zoom_release (Mackie::Button &)
|
||||
{
|
||||
return _jog_wheel.jog_wheel_state() == JogWheel::zoom;
|
||||
_zoom_mode = false;
|
||||
return off;
|
||||
}
|
||||
|
||||
Mackie::LedState
|
||||
@ -1837,3 +1872,551 @@ MackieControlProtocol::control_in_use_timeout (SurfacePort* port, Control* in_us
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::update_led (Button& button, Mackie::LedState ls)
|
||||
{
|
||||
if (ls != none) {
|
||||
SurfacePort * port = 0;
|
||||
|
||||
if (button.group().is_strip()) {
|
||||
if (button.group().is_master()) {
|
||||
port = &mcu_port();
|
||||
} else {
|
||||
port = &port_for_id (dynamic_cast<const Strip&> (button.group()).index());
|
||||
}
|
||||
} else {
|
||||
port = &mcu_port();
|
||||
}
|
||||
port->write (builder.build_led (button, ls));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::handle_button_event (Button& button, ButtonState bs)
|
||||
{
|
||||
if (bs != press && bs != release) {
|
||||
update_led (button, none);
|
||||
return;
|
||||
}
|
||||
|
||||
LedState ls;
|
||||
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Handling %1 for button %2\n", (bs == press ? "press" : "release"), button.raw_id()));
|
||||
|
||||
switch (button.raw_id()) {
|
||||
case 0x28: // io
|
||||
switch (bs) {
|
||||
case press: ls = io_press (button); break;
|
||||
case release: ls = io_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x29: // sends
|
||||
switch (bs) {
|
||||
case press: ls = sends_press (button); break;
|
||||
case release: ls = sends_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2a: // pan
|
||||
switch (bs) {
|
||||
case press: ls = pan_press (button); break;
|
||||
case release: ls = pan_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2b: // plugin
|
||||
switch (bs) {
|
||||
case press: ls = plugin_press (button); break;
|
||||
case release: ls = plugin_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2c: // eq
|
||||
switch (bs) {
|
||||
case press: ls = eq_press (button); break;
|
||||
case release: ls = eq_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2d: // dyn
|
||||
switch (bs) {
|
||||
case press: ls = dyn_press (button); break;
|
||||
case release: ls = dyn_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2e: // left
|
||||
switch (bs) {
|
||||
case press: ls = left_press (button); break;
|
||||
case release: ls = left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x2f: // right
|
||||
switch (bs) {
|
||||
case press: ls = right_press (button); break;
|
||||
case release: ls = right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x30: // channel_left
|
||||
switch (bs) {
|
||||
case press: ls = channel_left_press (button); break;
|
||||
case release: ls = channel_left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x31: // channel_right
|
||||
switch (bs) {
|
||||
case press: ls = channel_right_press (button); break;
|
||||
case release: ls = channel_right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x32: // flip
|
||||
switch (bs) {
|
||||
case press: ls = flip_press (button); break;
|
||||
case release: ls = flip_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x33: // edit
|
||||
switch (bs) {
|
||||
case press: ls = edit_press (button); break;
|
||||
case release: ls = edit_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x34: // name_value
|
||||
switch (bs) {
|
||||
case press: ls = name_value_press (button); break;
|
||||
case release: ls = name_value_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x35: // timecode_beats
|
||||
switch (bs) {
|
||||
case press: ls = timecode_beats_press (button); break;
|
||||
case release: ls = timecode_beats_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x36: // F1
|
||||
switch (bs) {
|
||||
case press: ls = F1_press (button); break;
|
||||
case release: ls = F1_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x37: // F2
|
||||
switch (bs) {
|
||||
case press: ls = F2_press (button); break;
|
||||
case release: ls = F2_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x38: // F3
|
||||
switch (bs) {
|
||||
case press: ls = F3_press (button); break;
|
||||
case release: ls = F3_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x39: // F4
|
||||
switch (bs) {
|
||||
case press: ls = F4_press (button); break;
|
||||
case release: ls = F4_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3a: // F5
|
||||
switch (bs) {
|
||||
case press: ls = F5_press (button); break;
|
||||
case release: ls = F5_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3b: // F6
|
||||
switch (bs) {
|
||||
case press: ls = F6_press (button); break;
|
||||
case release: ls = F6_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3c: // F7
|
||||
switch (bs) {
|
||||
case press: ls = F7_press (button); break;
|
||||
case release: ls = F7_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3d: // F8
|
||||
switch (bs) {
|
||||
case press: ls = F8_press (button); break;
|
||||
case release: ls = F8_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3e: // F9
|
||||
switch (bs) {
|
||||
case press: ls = F9_press (button); break;
|
||||
case release: ls = F9_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x3f: // F10
|
||||
switch (bs) {
|
||||
case press: ls = F10_press (button); break;
|
||||
case release: ls = F10_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x40: // F11
|
||||
switch (bs) {
|
||||
case press: ls = F11_press (button); break;
|
||||
case release: ls = F11_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x41: // F12
|
||||
switch (bs) {
|
||||
case press: ls = F12_press (button); break;
|
||||
case release: ls = F12_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x42: // F13
|
||||
switch (bs) {
|
||||
case press: ls = F13_press (button); break;
|
||||
case release: ls = F13_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x43: // F14
|
||||
switch (bs) {
|
||||
case press: ls = F14_press (button); break;
|
||||
case release: ls = F14_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x44: // F15
|
||||
switch (bs) {
|
||||
case press: ls = F15_press (button); break;
|
||||
case release: ls = F15_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x45: // F16
|
||||
switch (bs) {
|
||||
case press: ls = F16_press (button); break;
|
||||
case release: ls = F16_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x46: // shift
|
||||
switch (bs) {
|
||||
case press: ls = shift_press (button); break;
|
||||
case release: ls = shift_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x47: // option
|
||||
switch (bs) {
|
||||
case press: ls = option_press (button); break;
|
||||
case release: ls = option_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x48: // control
|
||||
switch (bs) {
|
||||
case press: ls = control_press (button); break;
|
||||
case release: ls = control_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x49: // cmd_alt
|
||||
switch (bs) {
|
||||
case press: ls = cmd_alt_press (button); break;
|
||||
case release: ls = cmd_alt_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4a: // on
|
||||
switch (bs) {
|
||||
case press: ls = on_press (button); break;
|
||||
case release: ls = on_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4b: // rec_ready
|
||||
switch (bs) {
|
||||
case press: ls = rec_ready_press (button); break;
|
||||
case release: ls = rec_ready_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4c: // undo
|
||||
switch (bs) {
|
||||
case press: ls = undo_press (button); break;
|
||||
case release: ls = undo_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4d: // snapshot
|
||||
switch (bs) {
|
||||
case press: ls = snapshot_press (button); break;
|
||||
case release: ls = snapshot_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4e: // touch
|
||||
switch (bs) {
|
||||
case press: ls = touch_press (button); break;
|
||||
case release: ls = touch_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4f: // redo
|
||||
switch (bs) {
|
||||
case press: ls = redo_press (button); break;
|
||||
case release: ls = redo_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x50: // marker
|
||||
switch (bs) {
|
||||
case press: ls = marker_press (button); break;
|
||||
case release: ls = marker_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x51: // enter
|
||||
switch (bs) {
|
||||
case press: ls = enter_press (button); break;
|
||||
case release: ls = enter_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x52: // cancel
|
||||
switch (bs) {
|
||||
case press: ls = cancel_press (button); break;
|
||||
case release: ls = cancel_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x53: // mixer
|
||||
switch (bs) {
|
||||
case press: ls = mixer_press (button); break;
|
||||
case release: ls = mixer_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x54: // frm_left
|
||||
switch (bs) {
|
||||
case press: ls = frm_left_press (button); break;
|
||||
case release: ls = frm_left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x55: // frm_right
|
||||
switch (bs) {
|
||||
case press: ls = frm_right_press (button); break;
|
||||
case release: ls = frm_right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x56: // loop
|
||||
switch (bs) {
|
||||
case press: ls = loop_press (button); break;
|
||||
case release: ls = loop_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x57: // punch_in
|
||||
switch (bs) {
|
||||
case press: ls = punch_in_press (button); break;
|
||||
case release: ls = punch_in_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x58: // punch_out
|
||||
switch (bs) {
|
||||
case press: ls = punch_out_press (button); break;
|
||||
case release: ls = punch_out_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x59: // home
|
||||
switch (bs) {
|
||||
case press: ls = home_press (button); break;
|
||||
case release: ls = home_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5a: // end
|
||||
switch (bs) {
|
||||
case press: ls = end_press (button); break;
|
||||
case release: ls = end_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5b: // rewind
|
||||
switch (bs) {
|
||||
case press: ls = rewind_press (button); break;
|
||||
case release: ls = rewind_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5c: // ffwd
|
||||
switch (bs) {
|
||||
case press: ls = ffwd_press (button); break;
|
||||
case release: ls = ffwd_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5d: // stop
|
||||
switch (bs) {
|
||||
case press: ls = stop_press (button); break;
|
||||
case release: ls = stop_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5e: // play
|
||||
switch (bs) {
|
||||
case press: ls = play_press (button); break;
|
||||
case release: ls = play_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5f: // record
|
||||
switch (bs) {
|
||||
case press: ls = record_press (button); break;
|
||||
case release: ls = record_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x60: // cursor_up
|
||||
switch (bs) {
|
||||
case press: ls = cursor_up_press (button); break;
|
||||
case release: ls = cursor_up_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x61: // cursor_down
|
||||
switch (bs) {
|
||||
case press: ls = cursor_down_press (button); break;
|
||||
case release: ls = cursor_down_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x62: // cursor_left
|
||||
switch (bs) {
|
||||
case press: ls = cursor_left_press (button); break;
|
||||
case release: ls = cursor_left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x63: // cursor_right
|
||||
switch (bs) {
|
||||
case press: ls = cursor_right_press (button); break;
|
||||
case release: ls = cursor_right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x64: // zoom
|
||||
switch (bs) {
|
||||
case press: ls = zoom_press (button); break;
|
||||
case release: ls = zoom_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x65: // scrub
|
||||
switch (bs) {
|
||||
case press: ls = scrub_press (button); break;
|
||||
case release: ls = scrub_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x66: // user_a
|
||||
switch (bs) {
|
||||
case press: ls = user_a_press (button); break;
|
||||
case release: ls = user_a_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x67: // user_b
|
||||
switch (bs) {
|
||||
case press: ls = user_b_press (button); break;
|
||||
case release: ls = user_b_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
update_led (button, ls);
|
||||
}
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "controls.h"
|
||||
#include "dummy_port.h"
|
||||
#include "route_signal.h"
|
||||
#include "mackie_button_handler.h"
|
||||
#include "mackie_port.h"
|
||||
#include "mackie_jog_wheel.h"
|
||||
#include "timer.h"
|
||||
@ -81,7 +80,6 @@ public:
|
||||
class MackieControlProtocol
|
||||
: public ARDOUR::ControlProtocol
|
||||
, public AbstractUI<MackieControlUIRequest>
|
||||
, public Mackie::MackieButtonHandler
|
||||
{
|
||||
public:
|
||||
MackieControlProtocol(ARDOUR::Session &);
|
||||
@ -104,6 +102,7 @@ class MackieControlProtocol
|
||||
|
||||
// control events
|
||||
void handle_control_event (Mackie::SurfacePort & port, Mackie::Control & control, const Mackie::ControlState & state);
|
||||
void handle_button_event (Mackie::Button& button, Mackie::ButtonState);
|
||||
|
||||
// strip/route related stuff
|
||||
public:
|
||||
@ -139,82 +138,150 @@ class MackieControlProtocol
|
||||
|
||||
void update_global_button(const std::string & name, Mackie::LedState);
|
||||
void update_global_led(const std::string & name, Mackie::LedState);
|
||||
|
||||
// transport button handler methods from MackieButtonHandler
|
||||
virtual Mackie::LedState frm_left_press(Mackie::Button &);
|
||||
virtual Mackie::LedState frm_left_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState frm_right_press(Mackie::Button &);
|
||||
virtual Mackie::LedState frm_right_release(Mackie::Button &);
|
||||
/* 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 &);
|
||||
Mackie::LedState play_release(Mackie::Button &);
|
||||
Mackie::LedState record_press(Mackie::Button &);
|
||||
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);
|
||||
Mackie::LedState ffwd_release(Mackie::Button & button);
|
||||
Mackie::LedState cursor_up_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_up_release (Mackie::Button &);
|
||||
Mackie::LedState cursor_down_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_down_release (Mackie::Button &);
|
||||
Mackie::LedState cursor_left_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_left_release (Mackie::Button &);
|
||||
Mackie::LedState cursor_right_press (Mackie::Button &);
|
||||
Mackie::LedState cursor_right_release (Mackie::Button &);
|
||||
Mackie::LedState left_press(Mackie::Button &);
|
||||
Mackie::LedState left_release(Mackie::Button &);
|
||||
Mackie::LedState right_press(Mackie::Button &);
|
||||
Mackie::LedState right_release(Mackie::Button &);
|
||||
Mackie::LedState channel_left_press(Mackie::Button &);
|
||||
Mackie::LedState channel_left_release(Mackie::Button &);
|
||||
Mackie::LedState channel_right_press(Mackie::Button &);
|
||||
Mackie::LedState channel_right_release(Mackie::Button &);
|
||||
Mackie::LedState clicking_press(Mackie::Button &);
|
||||
Mackie::LedState clicking_release(Mackie::Button &);
|
||||
Mackie::LedState global_solo_press(Mackie::Button &);
|
||||
Mackie::LedState global_solo_release(Mackie::Button &);
|
||||
Mackie::LedState marker_press(Mackie::Button &);
|
||||
Mackie::LedState marker_release(Mackie::Button &);
|
||||
Mackie::LedState drop_press(Mackie::Button &);
|
||||
Mackie::LedState drop_release(Mackie::Button &);
|
||||
Mackie::LedState save_press(Mackie::Button &);
|
||||
Mackie::LedState save_release(Mackie::Button &);
|
||||
Mackie::LedState timecode_beats_press(Mackie::Button &);
|
||||
Mackie::LedState timecode_beats_release(Mackie::Button &);
|
||||
Mackie::LedState zoom_press(Mackie::Button &);
|
||||
Mackie::LedState zoom_release(Mackie::Button &);
|
||||
Mackie::LedState scrub_press(Mackie::Button &);
|
||||
Mackie::LedState scrub_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState stop_press(Mackie::Button &);
|
||||
virtual Mackie::LedState stop_release(Mackie::Button &);
|
||||
/* unimplemented button handlers */
|
||||
|
||||
virtual Mackie::LedState play_press(Mackie::Button &);
|
||||
virtual Mackie::LedState play_release(Mackie::Button &);
|
||||
Mackie::LedState io_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState io_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState sends_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState sends_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState pan_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState pan_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState plugin_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState plugin_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState eq_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState eq_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState dyn_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState dyn_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState flip_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState flip_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState edit_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState edit_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState name_value_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState name_value_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F1_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F1_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F2_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F2_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F3_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F3_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F4_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F4_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F5_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F5_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F6_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F6_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F7_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F7_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F8_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F8_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F9_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F9_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F10_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F10_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F11_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F11_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F12_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F12_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F13_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F13_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F14_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F14_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F15_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F15_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F16_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState F16_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState shift_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState shift_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState option_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState option_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState control_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState control_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState cmd_alt_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState cmd_alt_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState on_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState on_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState rec_ready_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState rec_ready_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState undo_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState undo_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState snapshot_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState snapshot_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState touch_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState touch_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState redo_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState redo_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState enter_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState enter_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState cancel_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState cancel_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState mixer_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState mixer_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState user_a_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState user_a_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState user_b_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState user_b_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState fader_touch_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState fader_touch_release (Mackie::Button &) { return Mackie::off; }
|
||||
|
||||
virtual Mackie::LedState record_press(Mackie::Button &);
|
||||
virtual Mackie::LedState record_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState loop_press(Mackie::Button &);
|
||||
virtual Mackie::LedState loop_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState punch_in_press(Mackie::Button &);
|
||||
virtual Mackie::LedState punch_in_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState punch_out_press(Mackie::Button &);
|
||||
virtual Mackie::LedState punch_out_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState home_press(Mackie::Button &);
|
||||
virtual Mackie::LedState home_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState end_press(Mackie::Button &);
|
||||
virtual Mackie::LedState end_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState rewind_press(Mackie::Button & button);
|
||||
virtual Mackie::LedState rewind_release(Mackie::Button & button);
|
||||
|
||||
virtual Mackie::LedState ffwd_press(Mackie::Button & button);
|
||||
virtual Mackie::LedState ffwd_release(Mackie::Button & button);
|
||||
|
||||
// bank switching button handler methods from MackieButtonHandler
|
||||
virtual Mackie::LedState left_press(Mackie::Button &);
|
||||
virtual Mackie::LedState left_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState right_press(Mackie::Button &);
|
||||
virtual Mackie::LedState right_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState channel_left_press(Mackie::Button &);
|
||||
virtual Mackie::LedState channel_left_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState channel_right_press(Mackie::Button &);
|
||||
virtual Mackie::LedState channel_right_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState clicking_press(Mackie::Button &);
|
||||
virtual Mackie::LedState clicking_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState global_solo_press(Mackie::Button &);
|
||||
virtual Mackie::LedState global_solo_release(Mackie::Button &);
|
||||
|
||||
// function buttons
|
||||
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 &);
|
||||
|
||||
virtual Mackie::LedState timecode_beats_press(Mackie::Button &);
|
||||
virtual Mackie::LedState timecode_beats_release(Mackie::Button &);
|
||||
|
||||
// jog wheel states
|
||||
virtual Mackie::LedState zoom_press(Mackie::Button &);
|
||||
virtual Mackie::LedState zoom_release(Mackie::Button &);
|
||||
|
||||
virtual Mackie::LedState scrub_press(Mackie::Button &);
|
||||
virtual Mackie::LedState scrub_release(Mackie::Button &);
|
||||
|
||||
/// This is the main MCU port, ie not an extender port
|
||||
/// Only for use by JogWheel
|
||||
@ -359,6 +426,8 @@ class MackieControlProtocol
|
||||
|
||||
void build_gui ();
|
||||
void* _gui;
|
||||
|
||||
bool _zoom_mode;
|
||||
};
|
||||
|
||||
#endif // ardour_mackie_control_protocol_h
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "ardour/debug.h"
|
||||
|
||||
#include "mackie_button_handler.h"
|
||||
#include "control_group.h"
|
||||
#include "surface_port.h"
|
||||
#include "surface.h"
|
||||
@ -188,528 +187,3 @@ Surface::init_strips ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Surface::handle_button (MackieButtonHandler & mbh, ButtonState bs, Button & button)
|
||||
{
|
||||
if (bs != press && bs != release) {
|
||||
mbh.update_led (button, none);
|
||||
return;
|
||||
}
|
||||
|
||||
LedState ls;
|
||||
switch (button.id()) {
|
||||
case 0x9028: // io
|
||||
switch (bs) {
|
||||
case press: ls = mbh.io_press (button); break;
|
||||
case release: ls = mbh.io_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9029: // sends
|
||||
switch (bs) {
|
||||
case press: ls = mbh.sends_press (button); break;
|
||||
case release: ls = mbh.sends_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x902a: // pan
|
||||
switch (bs) {
|
||||
case press: ls = mbh.pan_press (button); break;
|
||||
case release: ls = mbh.pan_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x902b: // plugin
|
||||
switch (bs) {
|
||||
case press: ls = mbh.plugin_press (button); break;
|
||||
case release: ls = mbh.plugin_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x902c: // eq
|
||||
switch (bs) {
|
||||
case press: ls = mbh.eq_press (button); break;
|
||||
case release: ls = mbh.eq_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x902d: // dyn
|
||||
switch (bs) {
|
||||
case press: ls = mbh.dyn_press (button); break;
|
||||
case release: ls = mbh.dyn_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x902e: // left
|
||||
switch (bs) {
|
||||
case press: ls = mbh.left_press (button); break;
|
||||
case release: ls = mbh.left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x902f: // right
|
||||
switch (bs) {
|
||||
case press: ls = mbh.right_press (button); break;
|
||||
case release: ls = mbh.right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9030: // channel_left
|
||||
switch (bs) {
|
||||
case press: ls = mbh.channel_left_press (button); break;
|
||||
case release: ls = mbh.channel_left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9031: // channel_right
|
||||
switch (bs) {
|
||||
case press: ls = mbh.channel_right_press (button); break;
|
||||
case release: ls = mbh.channel_right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9032: // flip
|
||||
switch (bs) {
|
||||
case press: ls = mbh.flip_press (button); break;
|
||||
case release: ls = mbh.flip_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9033: // edit
|
||||
switch (bs) {
|
||||
case press: ls = mbh.edit_press (button); break;
|
||||
case release: ls = mbh.edit_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9034: // name_value
|
||||
switch (bs) {
|
||||
case press: ls = mbh.name_value_press (button); break;
|
||||
case release: ls = mbh.name_value_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9035: // timecode_beats
|
||||
switch (bs) {
|
||||
case press: ls = mbh.timecode_beats_press (button); break;
|
||||
case release: ls = mbh.timecode_beats_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9036: // F1
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F1_press (button); break;
|
||||
case release: ls = mbh.F1_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9037: // F2
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F2_press (button); break;
|
||||
case release: ls = mbh.F2_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9038: // F3
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F3_press (button); break;
|
||||
case release: ls = mbh.F3_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9039: // F4
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F4_press (button); break;
|
||||
case release: ls = mbh.F4_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x903a: // F5
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F5_press (button); break;
|
||||
case release: ls = mbh.F5_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x903b: // F6
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F6_press (button); break;
|
||||
case release: ls = mbh.F6_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x903c: // F7
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F7_press (button); break;
|
||||
case release: ls = mbh.F7_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x903d: // F8
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F8_press (button); break;
|
||||
case release: ls = mbh.F8_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x903e: // F9
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F9_press (button); break;
|
||||
case release: ls = mbh.F9_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x903f: // F10
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F10_press (button); break;
|
||||
case release: ls = mbh.F10_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9040: // F11
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F11_press (button); break;
|
||||
case release: ls = mbh.F11_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9041: // F12
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F12_press (button); break;
|
||||
case release: ls = mbh.F12_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9042: // F13
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F13_press (button); break;
|
||||
case release: ls = mbh.F13_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9043: // F14
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F14_press (button); break;
|
||||
case release: ls = mbh.F14_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9044: // F15
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F15_press (button); break;
|
||||
case release: ls = mbh.F15_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9045: // F16
|
||||
switch (bs) {
|
||||
case press: ls = mbh.F16_press (button); break;
|
||||
case release: ls = mbh.F16_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9046: // shift
|
||||
switch (bs) {
|
||||
case press: ls = mbh.shift_press (button); break;
|
||||
case release: ls = mbh.shift_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9047: // option
|
||||
switch (bs) {
|
||||
case press: ls = mbh.option_press (button); break;
|
||||
case release: ls = mbh.option_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9048: // control
|
||||
switch (bs) {
|
||||
case press: ls = mbh.control_press (button); break;
|
||||
case release: ls = mbh.control_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9049: // cmd_alt
|
||||
switch (bs) {
|
||||
case press: ls = mbh.cmd_alt_press (button); break;
|
||||
case release: ls = mbh.cmd_alt_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x904a: // on
|
||||
switch (bs) {
|
||||
case press: ls = mbh.on_press (button); break;
|
||||
case release: ls = mbh.on_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x904b: // rec_ready
|
||||
switch (bs) {
|
||||
case press: ls = mbh.rec_ready_press (button); break;
|
||||
case release: ls = mbh.rec_ready_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x904c: // undo
|
||||
switch (bs) {
|
||||
case press: ls = mbh.undo_press (button); break;
|
||||
case release: ls = mbh.undo_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x904d: // snapshot
|
||||
switch (bs) {
|
||||
case press: ls = mbh.snapshot_press (button); break;
|
||||
case release: ls = mbh.snapshot_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x904e: // touch
|
||||
switch (bs) {
|
||||
case press: ls = mbh.touch_press (button); break;
|
||||
case release: ls = mbh.touch_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x904f: // redo
|
||||
switch (bs) {
|
||||
case press: ls = mbh.redo_press (button); break;
|
||||
case release: ls = mbh.redo_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9050: // marker
|
||||
switch (bs) {
|
||||
case press: ls = mbh.marker_press (button); break;
|
||||
case release: ls = mbh.marker_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9051: // enter
|
||||
switch (bs) {
|
||||
case press: ls = mbh.enter_press (button); break;
|
||||
case release: ls = mbh.enter_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9052: // cancel
|
||||
switch (bs) {
|
||||
case press: ls = mbh.cancel_press (button); break;
|
||||
case release: ls = mbh.cancel_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9053: // mixer
|
||||
switch (bs) {
|
||||
case press: ls = mbh.mixer_press (button); break;
|
||||
case release: ls = mbh.mixer_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9054: // frm_left
|
||||
switch (bs) {
|
||||
case press: ls = mbh.frm_left_press (button); break;
|
||||
case release: ls = mbh.frm_left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9055: // frm_right
|
||||
switch (bs) {
|
||||
case press: ls = mbh.frm_right_press (button); break;
|
||||
case release: ls = mbh.frm_right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9056: // loop
|
||||
switch (bs) {
|
||||
case press: ls = mbh.loop_press (button); break;
|
||||
case release: ls = mbh.loop_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9057: // punch_in
|
||||
switch (bs) {
|
||||
case press: ls = mbh.punch_in_press (button); break;
|
||||
case release: ls = mbh.punch_in_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9058: // punch_out
|
||||
switch (bs) {
|
||||
case press: ls = mbh.punch_out_press (button); break;
|
||||
case release: ls = mbh.punch_out_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9059: // home
|
||||
switch (bs) {
|
||||
case press: ls = mbh.home_press (button); break;
|
||||
case release: ls = mbh.home_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x905a: // end
|
||||
switch (bs) {
|
||||
case press: ls = mbh.end_press (button); break;
|
||||
case release: ls = mbh.end_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x905b: // rewind
|
||||
switch (bs) {
|
||||
case press: ls = mbh.rewind_press (button); break;
|
||||
case release: ls = mbh.rewind_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x905c: // ffwd
|
||||
switch (bs) {
|
||||
case press: ls = mbh.ffwd_press (button); break;
|
||||
case release: ls = mbh.ffwd_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x905d: // stop
|
||||
switch (bs) {
|
||||
case press: ls = mbh.stop_press (button); break;
|
||||
case release: ls = mbh.stop_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x905e: // play
|
||||
switch (bs) {
|
||||
case press: ls = mbh.play_press (button); break;
|
||||
case release: ls = mbh.play_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x905f: // record
|
||||
switch (bs) {
|
||||
case press: ls = mbh.record_press (button); break;
|
||||
case release: ls = mbh.record_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9060: // cursor_up
|
||||
switch (bs) {
|
||||
case press: ls = mbh.cursor_up_press (button); break;
|
||||
case release: ls = mbh.cursor_up_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9061: // cursor_down
|
||||
switch (bs) {
|
||||
case press: ls = mbh.cursor_down_press (button); break;
|
||||
case release: ls = mbh.cursor_down_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9062: // cursor_left
|
||||
switch (bs) {
|
||||
case press: ls = mbh.cursor_left_press (button); break;
|
||||
case release: ls = mbh.cursor_left_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9063: // cursor_right
|
||||
switch (bs) {
|
||||
case press: ls = mbh.cursor_right_press (button); break;
|
||||
case release: ls = mbh.cursor_right_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9064: // zoom
|
||||
switch (bs) {
|
||||
case press: ls = mbh.zoom_press (button); break;
|
||||
case release: ls = mbh.zoom_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9065: // scrub
|
||||
switch (bs) {
|
||||
case press: ls = mbh.scrub_press (button); break;
|
||||
case release: ls = mbh.scrub_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9066: // user_a
|
||||
switch (bs) {
|
||||
case press: ls = mbh.user_a_press (button); break;
|
||||
case release: ls = mbh.user_a_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x9067: // user_b
|
||||
switch (bs) {
|
||||
case press: ls = mbh.user_b_press (button); break;
|
||||
case release: ls = mbh.user_b_release (button); break;
|
||||
case neither: break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
mbh.update_led (button, ls);
|
||||
}
|
||||
|
@ -87,9 +87,6 @@ public:
|
||||
|
||||
uint32_t max_strips() const { return _max_strips; }
|
||||
|
||||
/// map button ids to calls to press_ and release_ in mbh
|
||||
virtual void handle_button (MackieButtonHandler & mbh, ButtonState bs, Button & button);
|
||||
|
||||
public:
|
||||
/// display an indicator of the first switched-in Route. Do nothing by default.
|
||||
virtual void display_bank_start( SurfacePort &, MackieMidiBuilder &, uint32_t /*current_bank*/ ) {};
|
||||
|
@ -26,7 +26,6 @@ def build(bld):
|
||||
dummy_port.cc
|
||||
gui.cc
|
||||
interface.cc
|
||||
mackie_button_handler.cc
|
||||
mackie_control_protocol.cc
|
||||
mackie_control_protocol_poll.cc
|
||||
mackie_jog_wheel.cc
|
||||
|
Loading…
Reference in New Issue
Block a user