Ardour  8.7-14-g57a6773833
mackie_control_protocol.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2007 John Anderson
3  * Copyright (C) 2007-2009 David Robillard <d@drobilla.net>
4  * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2015-2016 Len Ovens <len@ovenwerks.net>
7  * Copyright (C) 2016-2018 Ben Loftis <ben@harrisonconsoles.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 #ifndef ardour_mackie_control_protocol_h
25 #define ardour_mackie_control_protocol_h
26 
27 #include <vector>
28 #include <map>
29 #include <list>
30 #include <set>
31 
32 #include <sys/time.h>
33 #include <pthread.h>
34 #define ABSTRACT_UI_EXPORTS
35 #include "pbd/abstract_ui.h"
36 #include "midi++/types.h"
37 #include "ardour/types.h"
39 
40 #include "types.h"
41 #include "midi_byte_array.h"
42 #include "controls.h"
43 #include "jog_wheel.h"
44 #include "timer.h"
45 #include "device_info.h"
46 #include "device_profile.h"
47 #include "subview.h"
48 
49 namespace ARDOUR {
50  class AutomationControl;
51  class Port;
52 }
53 
54 namespace MIDI {
55  class Port;
56 }
57 
58 namespace ArdourSurface { namespace MACKIE_NAMESPACE {
59 
60 class Surface;
61 class Control;
62 class SurfacePort;
63 class Button;
64 class Strip;
65 
66 gboolean ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data);
67 
68 struct MackieControlUIRequest : public BaseUI::BaseRequestObject {
69 public:
72 };
73 
76  , public AbstractUI<MackieControlUIRequest>
77 {
78  public:
79  static const int MODIFIER_OPTION;
80  static const int MODIFIER_CONTROL;
81  static const int MODIFIER_SHIFT;
82  static const int MODIFIER_CMDALT;
83  static const int MODIFIER_ZOOM;
84  static const int MODIFIER_SCRUB;
85  static const int MODIFIER_MARKER;
86  static const int MODIFIER_NUDGE;
87  static const int MAIN_MODIFIER_MASK;
88 
89  enum ViewMode {
99  };
100 
101  enum FlipMode {
102  Normal, /* fader controls primary, vpot controls secondary */
103  Mirror, /* fader + vpot control secondary */
104  Swap, /* fader controls secondary, vpot controls primary */
105  Zero, /* fader controls primary, but doesn't move, vpot controls secondary */
106  };
107 
110 
111  static MackieControlProtocol* instance() { return _instance; }
112 
113  const MACKIE_NAMESPACE::DeviceInfo& device_info() const { return _device_info; }
114  MACKIE_NAMESPACE::DeviceProfile& device_profile() { return _device_profile; }
115 
116  PBD::Signal0<void> DeviceChanged;
117  PBD::Signal1<void,std::shared_ptr<MACKIE_NAMESPACE::Surface> > ConnectionChange;
118 
119  void device_ready ();
120 
121  int set_active (bool yn);
122  int set_device (const std::string&, bool force);
123  void set_profile (const std::string&);
124 
125  FlipMode flip_mode () const { return _flip_mode; }
126  ViewMode view_mode () const { return _view_mode; }
127  std::shared_ptr<MACKIE_NAMESPACE::Subview> subview() { return _subview; }
128  bool zoom_mode () const { return modifier_state() & MODIFIER_ZOOM; }
129  bool metering_active () const { return _metering_active; }
130 
131  bool is_track (std::shared_ptr<ARDOUR::Stripable>) const;
132  bool is_audio_track (std::shared_ptr<ARDOUR::Stripable>) const;
133  bool is_midi_track (std::shared_ptr<ARDOUR::Stripable>) const;
134  bool is_trigger_track (std::shared_ptr<ARDOUR::Stripable>) const;
135  bool is_foldback_bus (std::shared_ptr<ARDOUR::Stripable>) const;
136  bool is_vca (std::shared_ptr<ARDOUR::Stripable>) const;
137  bool has_instrument (std::shared_ptr<ARDOUR::Stripable>) const;
138  bool is_mapped (std::shared_ptr<ARDOUR::Stripable>) const;
139  std::shared_ptr<ARDOUR::Stripable> first_selected_stripable () const;
140 
144 
146  bool set_subview_mode (MACKIE_NAMESPACE::Subview::Mode, std::shared_ptr<ARDOUR::Stripable>);
150 
151  XMLNode& get_state () const;
152  int set_state (const XMLNode&, int version);
153 
154  /* Note: because Mackie control is inherently a duplex protocol,
155  we do not implement get/set_feedback() since this aspect of
156  support for the protocol is not optional.
157  */
158 
159  mutable Glib::Threads::Mutex surfaces_lock;
160  typedef std::list<std::shared_ptr<MACKIE_NAMESPACE::Surface> > Surfaces;
162 
163  std::shared_ptr<MACKIE_NAMESPACE::Surface> get_surface_by_raw_pointer (void*) const;
164  std::shared_ptr<MACKIE_NAMESPACE::Surface> nth_surface (uint32_t) const;
165 
166  uint32_t global_index (MACKIE_NAMESPACE::Strip&);
167  uint32_t global_index_locked (MACKIE_NAMESPACE::Strip&);
168 
169  std::list<std::shared_ptr<ARDOUR::Bundle> > bundles ();
170 
171  void set_master_on_surface_strip (uint32_t surface, uint32_t strip);
172  void set_monitor_on_surface_strip (uint32_t surface, uint32_t strip);
173 
174  uint32_t n_strips (bool with_locked_strips = true) const;
175 
176  bool has_editor () const { return true; }
177  void* get_gui () const;
178  void tear_down_gui ();
179 
180  void handle_button_event (MACKIE_NAMESPACE::Surface&, MACKIE_NAMESPACE::Button& button, MACKIE_NAMESPACE::ButtonState);
181 
186 
188 
192 
196 
197  // button-related signals
202  // mainly to pick up punch-in and punch-out
203  void notify_parameter_changed(std::string const &);
205 
209 
211  void update_led(MACKIE_NAMESPACE::Surface&, MACKIE_NAMESPACE::Button & button, MACKIE_NAMESPACE::LedState);
212 
213  void update_global_button (int id, MACKIE_NAMESPACE::LedState);
214  void update_global_led (int id, MACKIE_NAMESPACE::LedState);
215 
218 
219  int modifier_state() const { return _modifier_state; }
220  int main_modifier_state() const { return _modifier_state & MAIN_MODIFIER_MASK; }
221 
222  typedef std::list<std::shared_ptr<ARDOUR::AutomationControl> > ControlList;
223 
224  void add_down_button (ARDOUR::AutomationType, int surface, int strip);
225  void remove_down_button (ARDOUR::AutomationType, int surface, int strip);
227 
228  void add_down_select_button (int surface, int strip);
229  void remove_down_select_button (int surface, int strip);
230  void select_range (uint32_t pressed);
231 
232  int16_t ipmidi_base() const { return _ipmidi_base; }
233  void set_ipmidi_base (int16_t);
234 
235  protected:
236  // shut down the surface
237  void close();
238 
239  // This sets up the notifications and sets the
240  // controls to the correct values
242 
243  // connects global (not strip) signals from the Session to here
244  // so the surface can be notified of changes from the other UIs.
246 
247  // set all controls to their zero position
248  void zero_all();
249 
254  typedef std::vector<std::shared_ptr<ARDOUR::Stripable> > Sorted;
256 
257  // bank switching
258  int switch_banks (uint32_t first_remote_id, bool force = false);
259  void prev_track ();
260  void next_track ();
261 
262  // also called from poll_automation to update timecode display
264 
265  std::string format_bbt_timecode (ARDOUR::samplepos_t now_sample);
267 
269  int stop ();
270 
271  void thread_init ();
272 
273  bool stripable_is_locked_to_strip (std::shared_ptr<ARDOUR::Stripable>) const;
274 
276 
277  private:
278 
279  struct ButtonHandlers {
280  MACKIE_NAMESPACE::LedState (MackieControlProtocol::*press) (MACKIE_NAMESPACE::Button&);
281  MACKIE_NAMESPACE::LedState (MackieControlProtocol::*release) (MACKIE_NAMESPACE::Button&);
282 
283  ButtonHandlers (MACKIE_NAMESPACE::LedState (MackieControlProtocol::*p) (MACKIE_NAMESPACE::Button&),
284  MACKIE_NAMESPACE::LedState (MackieControlProtocol::*r) (MACKIE_NAMESPACE::Button&))
285  : press (p)
286  , release (r) {}
287  };
288 
289  typedef std::map<MACKIE_NAMESPACE::Button::ID,ButtonHandlers> ButtonMap;
290 
292 
293  bool profile_exists (std::string const&) const;
294 
295  MACKIE_NAMESPACE::DeviceInfo _device_info;
296  MACKIE_NAMESPACE::DeviceProfile _device_profile;
297  sigc::connection periodic_connection;
298  sigc::connection redisplay_connection;
299  sigc::connection hui_connection;
306  // timer for two quick marker left presses
307  MACKIE_NAMESPACE::Timer _frm_left_last;
308  // last written timecode string
309  std::string _timecode_last;
311  // Which timecode are we displaying? BBT or Timecode
313  // Bundle to represent our input ports
314  std::shared_ptr<ARDOUR::Bundle> _input_bundle;
315  // Bundle to represent our output ports
316  std::shared_ptr<ARDOUR::Bundle> _output_bundle;
317  void* _gui;
321  std::shared_ptr<MACKIE_NAMESPACE::Subview> _subview;
325  int16_t _ipmidi_base;
331  int _last_bank[9];
334 
335  std::shared_ptr<ArdourSurface::MACKIE_NAMESPACE::Surface> _master_surface;
336 
337  struct ipMIDIHandler {
340  };
341  friend struct ipMIDIHandler; /* is this necessary */
342  friend gboolean ArdourSurface::MACKIE_NAMESPACE::ipmidi_input_handler (GIOChannel*, GIOCondition condition, void *data);
343 
345  bool periodic();
346  bool redisplay();
347  bool hui_heartbeat ();
348  void build_gui ();
349  bool midi_input_handler (Glib::IOCondition ioc, MIDI::Port* port);
350  void clear_ports ();
351  void clear_surfaces ();
352  void force_special_stripable_to_strip (std::shared_ptr<ARDOUR::Stripable> r, uint32_t surface, uint32_t strip_number);
357  void initialize ();
358  int set_device_info (const std::string& device_name);
360 
361  /* MIDI port connection management */
362 
364  void connection_handler (std::weak_ptr<ARDOUR::Port>, std::string name1, std::weak_ptr<ARDOUR::Port>, std::string name2, bool);
365 
366  /* BUTTON HANDLING */
367 
368  typedef std::set<uint32_t> DownButtonList;
369  typedef std::map<ARDOUR::AutomationType,DownButtonList> DownButtonMap;
372 
374 
375  /* implemented button handlers */
376  MACKIE_NAMESPACE::LedState stop_press(MACKIE_NAMESPACE::Button &);
377  MACKIE_NAMESPACE::LedState stop_release(MACKIE_NAMESPACE::Button &);
378  MACKIE_NAMESPACE::LedState play_press(MACKIE_NAMESPACE::Button &);
379  MACKIE_NAMESPACE::LedState play_release(MACKIE_NAMESPACE::Button &);
380  MACKIE_NAMESPACE::LedState record_press(MACKIE_NAMESPACE::Button &);
381  MACKIE_NAMESPACE::LedState record_release(MACKIE_NAMESPACE::Button &);
382  MACKIE_NAMESPACE::LedState loop_press(MACKIE_NAMESPACE::Button &);
383  MACKIE_NAMESPACE::LedState loop_release(MACKIE_NAMESPACE::Button &);
384  MACKIE_NAMESPACE::LedState rewind_press(MACKIE_NAMESPACE::Button & button);
385  MACKIE_NAMESPACE::LedState rewind_release(MACKIE_NAMESPACE::Button & button);
386  MACKIE_NAMESPACE::LedState ffwd_press(MACKIE_NAMESPACE::Button & button);
387  MACKIE_NAMESPACE::LedState ffwd_release(MACKIE_NAMESPACE::Button & button);
388  MACKIE_NAMESPACE::LedState cursor_up_press (MACKIE_NAMESPACE::Button &);
389  MACKIE_NAMESPACE::LedState cursor_up_release (MACKIE_NAMESPACE::Button &);
390  MACKIE_NAMESPACE::LedState cursor_down_press (MACKIE_NAMESPACE::Button &);
391  MACKIE_NAMESPACE::LedState cursor_down_release (MACKIE_NAMESPACE::Button &);
392  MACKIE_NAMESPACE::LedState cursor_left_press (MACKIE_NAMESPACE::Button &);
393  MACKIE_NAMESPACE::LedState cursor_left_release (MACKIE_NAMESPACE::Button &);
394  MACKIE_NAMESPACE::LedState cursor_right_press (MACKIE_NAMESPACE::Button &);
395  MACKIE_NAMESPACE::LedState cursor_right_release (MACKIE_NAMESPACE::Button &);
396  MACKIE_NAMESPACE::LedState left_press(MACKIE_NAMESPACE::Button &);
397  MACKIE_NAMESPACE::LedState left_release(MACKIE_NAMESPACE::Button &);
398  MACKIE_NAMESPACE::LedState right_press(MACKIE_NAMESPACE::Button &);
399  MACKIE_NAMESPACE::LedState right_release(MACKIE_NAMESPACE::Button &);
400  MACKIE_NAMESPACE::LedState channel_left_press(MACKIE_NAMESPACE::Button &);
401  MACKIE_NAMESPACE::LedState channel_left_release(MACKIE_NAMESPACE::Button &);
402  MACKIE_NAMESPACE::LedState channel_right_press(MACKIE_NAMESPACE::Button &);
403  MACKIE_NAMESPACE::LedState channel_right_release(MACKIE_NAMESPACE::Button &);
404  MACKIE_NAMESPACE::LedState marker_press(MACKIE_NAMESPACE::Button &);
405  MACKIE_NAMESPACE::LedState marker_release(MACKIE_NAMESPACE::Button &);
406  MACKIE_NAMESPACE::LedState save_press(MACKIE_NAMESPACE::Button &);
407  MACKIE_NAMESPACE::LedState save_release(MACKIE_NAMESPACE::Button &);
408  MACKIE_NAMESPACE::LedState timecode_beats_press(MACKIE_NAMESPACE::Button &);
409  MACKIE_NAMESPACE::LedState timecode_beats_release(MACKIE_NAMESPACE::Button &);
410  MACKIE_NAMESPACE::LedState zoom_press(MACKIE_NAMESPACE::Button &);
411  MACKIE_NAMESPACE::LedState zoom_release(MACKIE_NAMESPACE::Button &);
412  MACKIE_NAMESPACE::LedState scrub_press(MACKIE_NAMESPACE::Button &);
413  MACKIE_NAMESPACE::LedState scrub_release(MACKIE_NAMESPACE::Button &);
414  MACKIE_NAMESPACE::LedState undo_press (MACKIE_NAMESPACE::Button &);
415  MACKIE_NAMESPACE::LedState undo_release (MACKIE_NAMESPACE::Button &);
416  MACKIE_NAMESPACE::LedState shift_press (MACKIE_NAMESPACE::Button &);
417  MACKIE_NAMESPACE::LedState shift_release (MACKIE_NAMESPACE::Button &);
418  MACKIE_NAMESPACE::LedState option_press (MACKIE_NAMESPACE::Button &);
419  MACKIE_NAMESPACE::LedState option_release (MACKIE_NAMESPACE::Button &);
420  MACKIE_NAMESPACE::LedState control_press (MACKIE_NAMESPACE::Button &);
421  MACKIE_NAMESPACE::LedState control_release (MACKIE_NAMESPACE::Button &);
422  MACKIE_NAMESPACE::LedState cmd_alt_press (MACKIE_NAMESPACE::Button &);
423  MACKIE_NAMESPACE::LedState cmd_alt_release (MACKIE_NAMESPACE::Button &);
424 
425  MACKIE_NAMESPACE::LedState pan_press (MACKIE_NAMESPACE::Button &);
426  MACKIE_NAMESPACE::LedState pan_release (MACKIE_NAMESPACE::Button &);
427  MACKIE_NAMESPACE::LedState plugin_press (MACKIE_NAMESPACE::Button &);
428  MACKIE_NAMESPACE::LedState plugin_release (MACKIE_NAMESPACE::Button &);
429  MACKIE_NAMESPACE::LedState eq_press (MACKIE_NAMESPACE::Button &);
430  MACKIE_NAMESPACE::LedState eq_release (MACKIE_NAMESPACE::Button &);
431  MACKIE_NAMESPACE::LedState dyn_press (MACKIE_NAMESPACE::Button &);
432  MACKIE_NAMESPACE::LedState dyn_release (MACKIE_NAMESPACE::Button &);
433  MACKIE_NAMESPACE::LedState flip_press (MACKIE_NAMESPACE::Button &);
434  MACKIE_NAMESPACE::LedState flip_release (MACKIE_NAMESPACE::Button &);
435  MACKIE_NAMESPACE::LedState name_value_press (MACKIE_NAMESPACE::Button &);
436  MACKIE_NAMESPACE::LedState name_value_release (MACKIE_NAMESPACE::Button &);
437 // MACKIE_NAMESPACE::LedState F1_press (MACKIE_NAMESPACE::Button &);
438 // MACKIE_NAMESPACE::LedState F1_release (MACKIE_NAMESPACE::Button &);
439 // MACKIE_NAMESPACE::LedState F2_press (MACKIE_NAMESPACE::Button &);
440 // MACKIE_NAMESPACE::LedState F2_release (MACKIE_NAMESPACE::Button &);
441 // MACKIE_NAMESPACE::LedState F3_press (MACKIE_NAMESPACE::Button &);
442 // MACKIE_NAMESPACE::LedState F3_release (MACKIE_NAMESPACE::Button &);
443 // MACKIE_NAMESPACE::LedState F4_press (MACKIE_NAMESPACE::Button &);
444 // MACKIE_NAMESPACE::LedState F4_release (MACKIE_NAMESPACE::Button &);
445 // MACKIE_NAMESPACE::LedState F5_press (MACKIE_NAMESPACE::Button &);
446 // MACKIE_NAMESPACE::LedState F5_release (MACKIE_NAMESPACE::Button &);
447 // MACKIE_NAMESPACE::LedState F6_press (MACKIE_NAMESPACE::Button &);
448 // MACKIE_NAMESPACE::LedState F6_release (MACKIE_NAMESPACE::Button &);
449 // MACKIE_NAMESPACE::LedState F7_press (MACKIE_NAMESPACE::Button &);
450 // MACKIE_NAMESPACE::LedState F7_release (MACKIE_NAMESPACE::Button &);
451 // MACKIE_NAMESPACE::LedState F8_press (MACKIE_NAMESPACE::Button &);
452 // MACKIE_NAMESPACE::LedState F8_release (MACKIE_NAMESPACE::Button &);
453  MACKIE_NAMESPACE::LedState touch_press (MACKIE_NAMESPACE::Button &);
454  MACKIE_NAMESPACE::LedState touch_release (MACKIE_NAMESPACE::Button &);
455  MACKIE_NAMESPACE::LedState enter_press (MACKIE_NAMESPACE::Button &);
456  MACKIE_NAMESPACE::LedState enter_release (MACKIE_NAMESPACE::Button &);
457  MACKIE_NAMESPACE::LedState cancel_press (MACKIE_NAMESPACE::Button &);
458  MACKIE_NAMESPACE::LedState cancel_release (MACKIE_NAMESPACE::Button &);
459  MACKIE_NAMESPACE::LedState user_a_press (MACKIE_NAMESPACE::Button &);
460  MACKIE_NAMESPACE::LedState user_a_release (MACKIE_NAMESPACE::Button &);
461  MACKIE_NAMESPACE::LedState user_b_press (MACKIE_NAMESPACE::Button &);
462  MACKIE_NAMESPACE::LedState user_b_release (MACKIE_NAMESPACE::Button &);
463  MACKIE_NAMESPACE::LedState fader_touch_press (MACKIE_NAMESPACE::Button &);
464  MACKIE_NAMESPACE::LedState fader_touch_release (MACKIE_NAMESPACE::Button &);
465  MACKIE_NAMESPACE::LedState master_fader_touch_press (MACKIE_NAMESPACE::Button &);
466  MACKIE_NAMESPACE::LedState master_fader_touch_release (MACKIE_NAMESPACE::Button &);
467 
468  MACKIE_NAMESPACE::LedState read_press (MACKIE_NAMESPACE::Button&);
469  MACKIE_NAMESPACE::LedState read_release (MACKIE_NAMESPACE::Button&);
470  MACKIE_NAMESPACE::LedState write_press (MACKIE_NAMESPACE::Button&);
471  MACKIE_NAMESPACE::LedState write_release (MACKIE_NAMESPACE::Button&);
472  MACKIE_NAMESPACE::LedState clearsolo_press (MACKIE_NAMESPACE::Button&);
473  MACKIE_NAMESPACE::LedState clearsolo_release (MACKIE_NAMESPACE::Button&);
474  MACKIE_NAMESPACE::LedState track_press (MACKIE_NAMESPACE::Button&);
475  MACKIE_NAMESPACE::LedState track_release (MACKIE_NAMESPACE::Button&);
476  MACKIE_NAMESPACE::LedState send_press (MACKIE_NAMESPACE::Button&);
477  MACKIE_NAMESPACE::LedState send_release (MACKIE_NAMESPACE::Button&);
478  MACKIE_NAMESPACE::LedState miditracks_press (MACKIE_NAMESPACE::Button&);
479  MACKIE_NAMESPACE::LedState miditracks_release (MACKIE_NAMESPACE::Button&);
480  MACKIE_NAMESPACE::LedState inputs_press (MACKIE_NAMESPACE::Button&);
481  MACKIE_NAMESPACE::LedState inputs_release (MACKIE_NAMESPACE::Button&);
482  MACKIE_NAMESPACE::LedState audiotracks_press (MACKIE_NAMESPACE::Button&);
483  MACKIE_NAMESPACE::LedState audiotracks_release (MACKIE_NAMESPACE::Button&);
484  MACKIE_NAMESPACE::LedState audioinstruments_press (MACKIE_NAMESPACE::Button&);
485  MACKIE_NAMESPACE::LedState audioinstruments_release (MACKIE_NAMESPACE::Button&);
486  MACKIE_NAMESPACE::LedState aux_press (MACKIE_NAMESPACE::Button&);
487  MACKIE_NAMESPACE::LedState aux_release (MACKIE_NAMESPACE::Button&);
488  MACKIE_NAMESPACE::LedState busses_press (MACKIE_NAMESPACE::Button&);
489  MACKIE_NAMESPACE::LedState busses_release (MACKIE_NAMESPACE::Button&);
490  MACKIE_NAMESPACE::LedState outputs_press (MACKIE_NAMESPACE::Button&);
491  MACKIE_NAMESPACE::LedState outputs_release (MACKIE_NAMESPACE::Button&);
492  MACKIE_NAMESPACE::LedState user_press (MACKIE_NAMESPACE::Button&);
493  MACKIE_NAMESPACE::LedState user_release (MACKIE_NAMESPACE::Button&);
494  MACKIE_NAMESPACE::LedState trim_press (MACKIE_NAMESPACE::Button&);
495  MACKIE_NAMESPACE::LedState trim_release (MACKIE_NAMESPACE::Button&);
496  MACKIE_NAMESPACE::LedState latch_press (MACKIE_NAMESPACE::Button&);
497  MACKIE_NAMESPACE::LedState latch_release (MACKIE_NAMESPACE::Button&);
498  MACKIE_NAMESPACE::LedState grp_press (MACKIE_NAMESPACE::Button&);
499  MACKIE_NAMESPACE::LedState grp_release (MACKIE_NAMESPACE::Button&);
500  MACKIE_NAMESPACE::LedState nudge_press (MACKIE_NAMESPACE::Button&);
501  MACKIE_NAMESPACE::LedState nudge_release (MACKIE_NAMESPACE::Button&);
502  MACKIE_NAMESPACE::LedState drop_press (MACKIE_NAMESPACE::Button&);
503  MACKIE_NAMESPACE::LedState drop_release (MACKIE_NAMESPACE::Button&);
504  MACKIE_NAMESPACE::LedState replace_press (MACKIE_NAMESPACE::Button&);
505  MACKIE_NAMESPACE::LedState replace_release (MACKIE_NAMESPACE::Button&);
506  MACKIE_NAMESPACE::LedState click_press (MACKIE_NAMESPACE::Button&);
507  MACKIE_NAMESPACE::LedState click_release (MACKIE_NAMESPACE::Button&);
508  MACKIE_NAMESPACE::LedState view_press (MACKIE_NAMESPACE::Button&);
509  MACKIE_NAMESPACE::LedState view_release (MACKIE_NAMESPACE::Button&);
510 
511  MACKIE_NAMESPACE::LedState bank_release (MACKIE_NAMESPACE::Button&, uint32_t bank_num);
512  MACKIE_NAMESPACE::LedState master_press(MACKIE_NAMESPACE::Button &);
513  MACKIE_NAMESPACE::LedState master_release(MACKIE_NAMESPACE::Button &);
514  MACKIE_NAMESPACE::LedState redo_press(MACKIE_NAMESPACE::Button &);
515  MACKIE_NAMESPACE::LedState redo_release(MACKIE_NAMESPACE::Button &);
516  MACKIE_NAMESPACE::LedState prev_marker_press(MACKIE_NAMESPACE::Button &);
517  MACKIE_NAMESPACE::LedState prev_marker_release(MACKIE_NAMESPACE::Button &);
518  MACKIE_NAMESPACE::LedState next_marker_press(MACKIE_NAMESPACE::Button &);
519  MACKIE_NAMESPACE::LedState next_marker_release(MACKIE_NAMESPACE::Button &);
520  MACKIE_NAMESPACE::LedState flip_window_press (MACKIE_NAMESPACE::Button&);
521  MACKIE_NAMESPACE::LedState flip_window_release (MACKIE_NAMESPACE::Button&);
522  MACKIE_NAMESPACE::LedState open_press(MACKIE_NAMESPACE::Button &);
523  MACKIE_NAMESPACE::LedState open_release(MACKIE_NAMESPACE::Button &);
524  MACKIE_NAMESPACE::LedState prog2_clear_solo_press(MACKIE_NAMESPACE::Button &);
525  MACKIE_NAMESPACE::LedState prog2_clear_solo_release(MACKIE_NAMESPACE::Button &);
526  MACKIE_NAMESPACE::LedState prog2_save_press(MACKIE_NAMESPACE::Button &);
527  MACKIE_NAMESPACE::LedState prog2_save_release(MACKIE_NAMESPACE::Button &);
528  MACKIE_NAMESPACE::LedState prog2_vst_press(MACKIE_NAMESPACE::Button &);
529  MACKIE_NAMESPACE::LedState prog2_vst_release(MACKIE_NAMESPACE::Button &);
530  MACKIE_NAMESPACE::LedState prog2_left_press(MACKIE_NAMESPACE::Button &);
531  MACKIE_NAMESPACE::LedState prog2_left_release(MACKIE_NAMESPACE::Button &);
532  MACKIE_NAMESPACE::LedState prog2_right_press(MACKIE_NAMESPACE::Button &);
533  MACKIE_NAMESPACE::LedState prog2_right_release(MACKIE_NAMESPACE::Button &);
534  MACKIE_NAMESPACE::LedState prog2_marker_press(MACKIE_NAMESPACE::Button &);
535  MACKIE_NAMESPACE::LedState prog2_marker_release(MACKIE_NAMESPACE::Button &);
536  MACKIE_NAMESPACE::LedState prog2_undo_press(MACKIE_NAMESPACE::Button &);
537  MACKIE_NAMESPACE::LedState prog2_undo_release(MACKIE_NAMESPACE::Button &);
538 };
539 
540 } // namespace
541 } // namespace
542 
543 #endif // ardour_mackie_control_protocol_h
NS_MCU ::LedState read_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_clear_solo_press(NS_MCU ::Button &)
void update_global_led(int id, NS_MCU ::LedState)
bool is_audio_track(std::shared_ptr< ARDOUR::Stripable >) const
NS_MCU ::LedState dyn_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_save_press(NS_MCU ::Button &)
NS_MCU ::LedState send_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_vst_press(NS_MCU ::Button &)
bool is_track(std::shared_ptr< ARDOUR::Stripable >) const
void force_special_stripable_to_strip(std::shared_ptr< ARDOUR::Stripable > r, uint32_t surface, uint32_t strip_number)
NS_MCU ::LedState miditracks_release(NS_MCU ::Button &)
NS_MCU ::LedState clearsolo_release(NS_MCU ::Button &)
NS_MCU ::LedState inputs_press(NS_MCU ::Button &)
NS_MCU ::LedState control_press(NS_MCU ::Button &)
NS_MCU ::LedState master_fader_touch_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_undo_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_clear_solo_release(NS_MCU ::Button &)
NS_MCU ::LedState replace_release(NS_MCU ::Button &)
NS_MCU ::LedState grp_press(NS_MCU ::Button &)
NS_MCU ::LedState drop_release(NS_MCU ::Button &)
NS_MCU ::LedState miditracks_press(NS_MCU ::Button &)
std::string format_bbt_timecode(ARDOUR::samplepos_t now_sample)
int set_state(const XMLNode &, int version)
NS_MCU ::LedState record_release(NS_MCU ::Button &)
NS_MCU ::LedState undo_release(NS_MCU ::Button &)
NS_MCU ::LedState option_release(NS_MCU ::Button &)
std::string format_timecode_timecode(ARDOUR::samplepos_t now_sample)
NS_MCU ::LedState channel_right_release(NS_MCU ::Button &)
NS_MCU ::LedState scrub_release(NS_MCU ::Button &)
NS_MCU ::LedState inputs_release(NS_MCU ::Button &)
NS_MCU ::LedState eq_release(NS_MCU ::Button &)
NS_MCU ::LedState busses_release(NS_MCU ::Button &)
NS_MCU ::LedState stop_press(NS_MCU ::Button &)
NS_MCU ::LedState view_press(NS_MCU ::Button &)
NS_MCU ::LedState next_marker_press(NS_MCU ::Button &)
NS_MCU ::LedState cursor_up_release(NS_MCU ::Button &)
NS_MCU ::LedState user_release(NS_MCU ::Button &)
NS_MCU ::LedState nudge_press(NS_MCU ::Button &)
NS_MCU ::LedState save_release(NS_MCU ::Button &)
NS_MCU ::LedState cmd_alt_release(NS_MCU ::Button &)
std::list< std::shared_ptr< NS_MCU ::Surface > > Surfaces
std::map< NS_MCU ::Button::ID, ButtonHandlers > ButtonMap
NS_MCU ::LedState master_fader_touch_release(NS_MCU ::Button &)
void set_monitor_on_surface_strip(uint32_t surface, uint32_t strip)
NS_MCU ::LedState cursor_right_press(NS_MCU ::Button &)
bool midi_input_handler(Glib::IOCondition ioc, MIDI::Port *port)
NS_MCU ::LedState fader_touch_release(NS_MCU ::Button &)
NS_MCU ::LedState cursor_left_press(NS_MCU ::Button &)
bool set_subview_mode(NS_MCU ::Subview::Mode, std::shared_ptr< ARDOUR::Stripable >)
NS_MCU ::LedState track_release(NS_MCU ::Button &)
void notify_presentation_info_changed(PBD::PropertyChange const &)
NS_MCU ::LedState dyn_release(NS_MCU ::Button &)
void update_led(NS_MCU ::Surface &, NS_MCU ::Button &button, NS_MCU ::LedState)
this is called to generate the midi to send in response to a button press.
bool is_midi_track(std::shared_ptr< ARDOUR::Stripable >) const
NS_MCU ::LedState click_release(NS_MCU ::Button &)
std::shared_ptr< ARDOUR::Stripable > first_selected_stripable() const
NS_MCU ::LedState ffwd_release(NS_MCU ::Button &button)
bool profile_exists(std::string const &) const
NS_MCU ::LedState latch_press(NS_MCU ::Button &)
NS_MCU ::LedState cursor_up_press(NS_MCU ::Button &)
NS_MCU ::LedState nudge_release(NS_MCU ::Button &)
std::shared_ptr< NS_MCU ::Subview > subview()
NS_MCU ::LedState cancel_release(NS_MCU ::Button &)
NS_MCU ::LedState plugin_release(NS_MCU ::Button &)
const NS_MCU ::DeviceInfo & device_info() const
NS_MCU ::LedState save_press(NS_MCU ::Button &)
NS_MCU ::LedState user_a_press(NS_MCU ::Button &)
NS_MCU ::LedState write_press(NS_MCU ::Button &)
NS_MCU ::LedState fader_touch_press(NS_MCU ::Button &)
NS_MCU ::LedState loop_release(NS_MCU ::Button &)
NS_MCU ::LedState prog2_right_release(NS_MCU ::Button &)
PBD::Signal1< void, std::shared_ptr< NS_MCU ::Surface > > ConnectionChange
NS_MCU ::LedState read_release(NS_MCU ::Button &)
NS_MCU ::LedState channel_right_press(NS_MCU ::Button &)
NS_MCU ::LedState user_b_press(NS_MCU ::Button &)
void notify_parameter_changed(std::string const &)
uint32_t global_index_locked(NS_MCU ::Strip &)
std::shared_ptr< ARDOUR::Bundle > _input_bundle
NS_MCU ::LedState user_press(NS_MCU ::Button &)
NS_MCU ::LedState timecode_beats_press(NS_MCU ::Button &)
NS_MCU ::LedState scrub_press(NS_MCU ::Button &)
NS_MCU ::LedState right_press(NS_MCU ::Button &)
NS_MCU ::LedState trim_press(NS_MCU ::Button &)
NS_MCU ::LedState plugin_press(NS_MCU ::Button &)
ControlList down_controls(ARDOUR::AutomationType, uint32_t pressed)
int switch_banks(uint32_t first_remote_id, bool force=false)
int set_device_info(const std::string &device_name)
void handle_button_event(NS_MCU ::Surface &, NS_MCU ::Button &button, NS_MCU ::ButtonState)
NS_MCU ::LedState clearsolo_press(NS_MCU ::Button &)
NS_MCU ::LedState audioinstruments_press(NS_MCU ::Button &)
NS_MCU ::LedState master_press(NS_MCU ::Button &)
NS_MCU ::LedState timecode_beats_release(NS_MCU ::Button &)
NS_MCU ::LedState marker_release(NS_MCU ::Button &)
NS_MCU ::LedState flip_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_left_press(NS_MCU ::Button &)
NS_MCU ::LedState cursor_down_press(NS_MCU ::Button &)
NS_MCU ::LedState drop_press(NS_MCU ::Button &)
NS_MCU ::LedState cmd_alt_press(NS_MCU ::Button &)
NS_MCU ::LedState redo_press(NS_MCU ::Button &)
NS_MCU ::LedState shift_release(NS_MCU ::Button &)
NS_MCU ::LedState marker_press(NS_MCU ::Button &)
NS_MCU ::LedState play_press(NS_MCU ::Button &)
NS_MCU ::LedState touch_release(NS_MCU ::Button &)
std::shared_ptr< NS_MCU ::Surface > get_surface_by_raw_pointer(void *) const
NS_MCU ::LedState record_press(NS_MCU ::Button &)
void add_down_select_button(int surface, int strip)
std::shared_ptr< ARDOUR::Bundle > _output_bundle
NS_MCU ::LedState redo_release(NS_MCU ::Button &)
NS_MCU ::LedState cancel_press(NS_MCU ::Button &)
NS_MCU ::LedState next_marker_release(NS_MCU ::Button &)
bool stripable_is_locked_to_strip(std::shared_ptr< ARDOUR::Stripable >) const
NS_MCU ::LedState send_release(NS_MCU ::Button &)
NS_MCU ::LedState pan_release(NS_MCU ::Button &)
bool is_mapped(std::shared_ptr< ARDOUR::Stripable >) const
bool is_trigger_track(std::shared_ptr< ARDOUR::Stripable >) const
NS_MCU ::LedState outputs_press(NS_MCU ::Button &)
NS_MCU ::LedState undo_press(NS_MCU ::Button &)
NS_MCU ::LedState latch_release(NS_MCU ::Button &)
NS_MCU ::LedState view_release(NS_MCU ::Button &)
void update_global_button(int id, NS_MCU ::LedState)
int set_device(const std::string &, bool force)
NS_MCU ::LedState user_a_release(NS_MCU ::Button &)
NS_MCU ::LedState prog2_marker_press(NS_MCU ::Button &)
MackieControlProtocol(ARDOUR::Session &, const char *name)
NS_MCU ::LedState channel_left_release(NS_MCU ::Button &)
std::shared_ptr< NS_MCU ::Surface > nth_surface(uint32_t) const
NS_MCU ::LedState trim_release(NS_MCU ::Button &)
bool is_foldback_bus(std::shared_ptr< ARDOUR::Stripable >) const
void add_down_button(ARDOUR::AutomationType, int surface, int strip)
NS_MCU ::LedState name_value_press(NS_MCU ::Button &)
NS_MCU ::LedState right_release(NS_MCU ::Button &)
NS_MCU ::LedState flip_window_press(NS_MCU ::Button &)
NS_MCU ::LedState grp_release(NS_MCU ::Button &)
NS_MCU ::LedState prog2_left_release(NS_MCU ::Button &)
NS_MCU ::LedState user_b_release(NS_MCU ::Button &)
NS_MCU ::LedState touch_press(NS_MCU ::Button &)
NS_MCU ::LedState stop_release(NS_MCU ::Button &)
NS_MCU ::LedState zoom_press(NS_MCU ::Button &)
NS_MCU ::LedState aux_release(NS_MCU ::Button &)
NS_MCU ::LedState left_release(NS_MCU ::Button &)
void do_request(MackieControlUIRequest *)
NS_MCU ::LedState replace_press(NS_MCU ::Button &)
NS_MCU ::LedState enter_press(NS_MCU ::Button &)
void set_automation_state(ARDOUR::AutoState)
NS_MCU ::LedState open_release(NS_MCU ::Button &)
NS_MCU ::LedState enter_release(NS_MCU ::Button &)
std::list< std::shared_ptr< ARDOUR::AutomationControl > > ControlList
NS_MCU ::LedState rewind_press(NS_MCU ::Button &button)
NS_MCU ::LedState control_release(NS_MCU ::Button &)
void remove_down_select_button(int surface, int strip)
void pull_stripable_range(DownButtonList &, ARDOUR::StripableList &, uint32_t pressed)
void connection_handler(std::weak_ptr< ARDOUR::Port >, std::string name1, std::weak_ptr< ARDOUR::Port >, std::string name2, bool)
uint32_t global_index(NS_MCU ::Strip &)
NS_MCU ::LedState prog2_vst_release(NS_MCU ::Button &)
NS_MCU ::LedState click_press(NS_MCU ::Button &)
NS_MCU ::LedState play_release(NS_MCU ::Button &)
bool has_instrument(std::shared_ptr< ARDOUR::Stripable >) const
NS_MCU ::LedState outputs_release(NS_MCU ::Button &)
NS_MCU ::LedState cursor_down_release(NS_MCU ::Button &)
NS_MCU ::LedState track_press(NS_MCU ::Button &)
NS_MCU ::LedState flip_window_release(NS_MCU ::Button &)
NS_MCU ::LedState prog2_undo_release(NS_MCU ::Button &)
NS_MCU ::LedState open_press(NS_MCU ::Button &)
NS_MCU ::LedState master_release(NS_MCU ::Button &)
NS_MCU ::LedState prev_marker_press(NS_MCU ::Button &)
NS_MCU ::LedState left_press(NS_MCU ::Button &)
void set_master_on_surface_strip(uint32_t surface, uint32_t strip)
NS_MCU ::LedState shift_press(NS_MCU ::Button &)
NS_MCU ::LedState prev_marker_release(NS_MCU ::Button &)
NS_MCU ::LedState option_press(NS_MCU ::Button &)
NS_MCU ::LedState channel_left_press(NS_MCU ::Button &)
NS_MCU ::LedState bank_release(NS_MCU ::Button &, uint32_t bank_num)
NS_MCU ::LedState aux_press(NS_MCU ::Button &)
NS_MCU ::LedState audiotracks_release(NS_MCU ::Button &)
std::map< ARDOUR::AutomationType, DownButtonList > DownButtonMap
void remove_down_button(ARDOUR::AutomationType, int surface, int strip)
std::shared_ptr< ArdourSurface::NS_MCU ::Surface > _master_surface
void notify_routes_added(ARDOUR::RouteList &)
uint32_t n_strips(bool with_locked_strips=true) const
NS_MCU ::LedState rewind_release(NS_MCU ::Button &button)
NS_MCU ::LedState eq_press(NS_MCU ::Button &)
NS_MCU ::LedState loop_press(NS_MCU ::Button &)
NS_MCU ::LedState prog2_save_release(NS_MCU ::Button &)
NS_MCU ::LedState ffwd_press(NS_MCU ::Button &button)
NS_MCU ::LedState prog2_marker_release(NS_MCU ::Button &)
NS_MCU ::LedState busses_press(NS_MCU ::Button &)
NS_MCU ::LedState audiotracks_press(NS_MCU ::Button &)
NS_MCU ::LedState flip_release(NS_MCU ::Button &)
std::shared_ptr< NS_MCU ::Subview > _subview
std::vector< std::shared_ptr< ARDOUR::Stripable > > Sorted
bool is_vca(std::shared_ptr< ARDOUR::Stripable >) const
NS_MCU ::LedState prog2_right_press(NS_MCU ::Button &)
NS_MCU ::LedState zoom_release(NS_MCU ::Button &)
NS_MCU ::LedState pan_press(NS_MCU ::Button &)
NS_MCU ::LedState write_release(NS_MCU ::Button &)
NS_MCU ::LedState cursor_right_release(NS_MCU ::Button &)
NS_MCU ::LedState audioinstruments_release(NS_MCU ::Button &)
std::list< std::shared_ptr< ARDOUR::Bundle > > bundles()
NS_MCU ::LedState name_value_release(NS_MCU ::Button &)
NS_MCU ::LedState cursor_left_release(NS_MCU ::Button &)
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
void session(lua_State *L)
std::list< std::shared_ptr< Stripable > > StripableList
std::list< std::shared_ptr< VCA > > VCAList
std::list< std::shared_ptr< Route > > RouteList
Temporal::samplepos_t samplepos_t
gboolean ipmidi_input_handler(GIOChannel *, GIOCondition condition, void *data)
ButtonHandlers(NS_MCU ::LedState(MackieControlProtocol::*p)(NS_MCU ::Button &), NS_MCU ::LedState(MackieControlProtocol::*r)(NS_MCU ::Button &))
#define MACKIE_NAMESPACE