8466d512fb4908e8fd647c9daff2abb847a31c34
[ardour.git] / libs / surfaces / osc / osc.h
1 /*
2  * Copyright (C) 2006-2009 Paul Davis
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19
20 #ifndef ardour_osc_h
21 #define ardour_osc_h
22
23 #include <string>
24 #include <vector>
25 #include <bitset>
26
27 #include <sys/time.h>
28 #include <pthread.h>
29
30 #include <boost/shared_ptr.hpp>
31
32 #include <lo/lo.h>
33
34 #include <glibmm/main.h>
35
36 #define ABSTRACT_UI_EXPORTS
37 #include "pbd/abstract_ui.h"
38
39 #include "ardour/types.h"
40 #include "control_protocol/control_protocol.h"
41
42 #include "i18n.h"
43
44 class OSCControllable;
45 class OSCRouteObserver;
46 class OSCGlobalObserver;
47 class OSCSelectObserver;
48
49 namespace ARDOUR {
50 class Session;
51 class Route;
52 }
53
54 /* this is mostly a placeholder because I suspect that at some
55    point we will want to add more members to accomodate
56    certain types of requests to the OSC UI
57 */
58
59 namespace ArdourSurface {
60
61 struct OSCUIRequest : public BaseUI::BaseRequestObject {
62   public:
63         OSCUIRequest () {}
64         ~OSCUIRequest() {}
65 };
66
67 class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
68 {
69   public:
70         OSC (ARDOUR::Session&, uint32_t port);
71         virtual ~OSC();
72
73         static OSC* instance() { return _instance; }
74
75         XMLNode& get_state ();
76         int set_state (const XMLNode&, int version);
77
78         bool has_editor () const { return true; }
79         void* get_gui () const;
80         void  tear_down_gui ();
81
82         int set_active (bool yn);
83         bool get_active () const;
84         int set_feedback (bool yn);
85         bool get_feedback () const;
86
87
88         int start ();
89         int stop ();
90
91         static void* request_factory (uint32_t);
92
93         enum OSCDebugMode {
94                 Off,
95                 Unhandled,
96                 All
97         };
98
99         typedef std::vector<boost::shared_ptr<ARDOUR::Stripable> > Sorted;
100         Sorted get_sorted_stripables(std::bitset<32> types);
101
102 // keep a surface's global setup by remote server url
103         struct OSCSurface {
104         public:
105                 std::string remote_url;         // the url these setting belong to
106                 uint32_t bank;                          // current bank
107                 uint32_t bank_size;                     // size of banks for this surface
108                 std::bitset<32> strip_types;// what strip types are a part of this bank
109                 uint32_t nstrips;                       // how many strips are there for strip_types
110                 std::bitset<32> feedback;       // What is fed back? strips/meters/timecode/bar_beat/global
111                 int gainmode;                           // what kind of faders do we have Gain db or position 0 to 1023?
112                 uint32_t surface_sel;           // which strip within the bank is locally selected
113                 OSCSelectObserver* sel_obs;     // So we can sync select feedback with selected channel
114                 Sorted strips;                          // list of stripables for this surface
115         };
116                 /*
117                  * Reminder of what strip_types there are
118                  *
119                 AudioTrack = 0x1 =      [0]
120                 MidiTrack = 0x2 =       [1]
121                 AudioBus = 0x4 =        [2]
122                 MidiBus = 0x8 =         [3]
123                 VCA = 0x10 =            [4]
124                 MasterOut = 0x20 =      [5]
125                 MonitorOut = 0x40 =     [6]
126                 Auditioner = 0x80 =     [7] skip don't look for.
127                 Selected = 0x100 =      [8]
128                 Hidden = 0x200 =        [9]
129                 OrderSet = 0x400,
130                 */
131                 /*
132                  * feedback bits:
133                  * [0] - Strips - buttons
134                  * [1] - Strips - variables (pots/faders)
135                  * [2] - Strips - Send SSID as path extension
136                  * [3] - Send heart beat to surface
137                  * [4] - Send feedback for master/global buttons/variables
138                  * [5] - Send Bar and Beat
139                  * [6] - Send Time code
140                  * [7] - Send metering as dB or positional depending on gainmode
141                  * [8] - Send metering as 16 bits (led strip)
142                  * [9] - Send signal present (signal greater than -20dB)
143                  * [10] - Announce follows Select
144                  */
145
146
147 // storage for  each surface's settings
148         typedef std::vector<OSCSurface> Surface;
149         Surface _surface;
150
151         std::string get_server_url ();
152         void set_debug_mode (OSCDebugMode m) { _debugmode = m; }
153         OSCDebugMode get_debug_mode () { return _debugmode; }
154
155   protected:
156         void thread_init ();
157         void do_request (OSCUIRequest*);
158
159         GSource* local_server;
160         GSource* remote_server;
161
162         bool osc_input_handler (Glib::IOCondition, lo_server);
163
164   private:
165         uint32_t _port;
166         volatile bool _ok;
167         volatile bool _shutdown;
168         lo_server _osc_server;
169         lo_server _osc_unix_server;
170         std::string _osc_unix_socket_path;
171         std::string _osc_url_file;
172         bool _send_route_changes;
173         OSCDebugMode _debugmode;
174         bool tick;
175         bool bank_dirty;
176
177         void register_callbacks ();
178
179         void route_added (ARDOUR::RouteList&);
180
181         // Handlers for "Application Hook" signals
182         void session_loaded (ARDOUR::Session&);
183         void session_exported (std::string, std::string);
184
185         // end "Application Hook" handles
186
187         std::string get_unix_server_url ();
188         OSCSurface * get_surface (lo_address addr);
189         uint32_t get_sid (boost::shared_ptr<ARDOUR::Stripable> strip, lo_address addr);
190         uint32_t get_rid (uint32_t ssid, lo_address addr);
191         boost::shared_ptr<ARDOUR::Stripable> get_strip (uint32_t ssid, lo_address addr);
192         void global_feedback (std::bitset<32> feedback, lo_address msg, uint32_t gainmode);
193
194         void send_current_value (const char* path, lo_arg** argv, int argc, lo_message msg);
195         void current_value_query (const char* path, size_t len, lo_arg **argv, int argc, lo_message msg);
196
197         int current_value (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data);
198
199         int catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data);
200         static int _catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data);
201
202         void routes_list (lo_message msg);
203         void transport_frame (lo_message msg);
204         void transport_speed (lo_message msg);
205         void record_enabled (lo_message msg);
206
207 #define OSC_DEBUG \
208         if (_debugmode == All) { \
209                 debugmsg (dgettext(PACKAGE, "OSC"), path, types, argv, argc); \
210         }
211
212 #define PATH_CALLBACK_MSG(name)                                 \
213         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
214                 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
215         } \
216         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \
217                 OSC_DEBUG;              \
218                 if (argc > 0 && !strcmp (types, "f") && argv[0]->f != 1.0) { return 0; } \
219                 name (data);            \
220                 return 0;               \
221         }
222
223         PATH_CALLBACK_MSG(routes_list);
224         PATH_CALLBACK_MSG(transport_frame);
225         PATH_CALLBACK_MSG(transport_speed);
226         PATH_CALLBACK_MSG(record_enabled);
227         PATH_CALLBACK_MSG(bank_up);
228         PATH_CALLBACK_MSG(bank_down);
229
230 #define PATH_CALLBACK(name) \
231         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
232                 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
233         } \
234         int cb_ ## name (const char *path, const char *types, lo_arg ** argv, int argc, void *) { \
235                 OSC_DEBUG;              \
236                 if (argc > 0 && !strcmp (types, "f") && argv[0]->f != 1.0) { return 0; } \
237                 name (); \
238                 return 0; \
239         }
240
241         PATH_CALLBACK(add_marker);
242         PATH_CALLBACK(loop_toggle);
243         PATH_CALLBACK(goto_start);
244         PATH_CALLBACK(goto_end);
245         PATH_CALLBACK(rewind);
246         PATH_CALLBACK(ffwd);
247         PATH_CALLBACK(transport_stop);
248         PATH_CALLBACK(transport_play);
249         PATH_CALLBACK(save_state);
250         PATH_CALLBACK(prev_marker);
251         PATH_CALLBACK(next_marker);
252         PATH_CALLBACK(undo);
253         PATH_CALLBACK(redo);
254         PATH_CALLBACK(toggle_punch_in);
255         PATH_CALLBACK(toggle_punch_out);
256         PATH_CALLBACK(rec_enable_toggle);
257         PATH_CALLBACK(toggle_all_rec_enables);
258         PATH_CALLBACK(all_tracks_rec_in);
259         PATH_CALLBACK(all_tracks_rec_out);
260         PATH_CALLBACK(remove_marker_at_playhead);
261         PATH_CALLBACK(mark_in);
262         PATH_CALLBACK(mark_out);
263         PATH_CALLBACK(toggle_click);
264         PATH_CALLBACK(midi_panic);
265         PATH_CALLBACK(toggle_roll);
266         PATH_CALLBACK(stop_forget);
267         PATH_CALLBACK(set_punch_range);
268         PATH_CALLBACK(set_loop_range);
269         PATH_CALLBACK(set_session_range);
270         PATH_CALLBACK(toggle_monitor_mute);
271         PATH_CALLBACK(toggle_monitor_dim);
272         PATH_CALLBACK(toggle_monitor_mono);
273         PATH_CALLBACK(quick_snapshot_stay);
274         PATH_CALLBACK(quick_snapshot_switch);
275         PATH_CALLBACK(fit_1_track);
276         PATH_CALLBACK(fit_2_tracks);
277         PATH_CALLBACK(fit_4_tracks);
278         PATH_CALLBACK(fit_8_tracks);
279         PATH_CALLBACK(fit_16_tracks);
280         PATH_CALLBACK(fit_32_tracks);
281         PATH_CALLBACK(fit_all_tracks);
282         PATH_CALLBACK(zoom_100_ms);
283         PATH_CALLBACK(zoom_1_sec);
284         PATH_CALLBACK(zoom_10_sec);
285         PATH_CALLBACK(zoom_1_min);
286         PATH_CALLBACK(zoom_5_min);
287         PATH_CALLBACK(zoom_10_min);
288         PATH_CALLBACK(zoom_to_session);
289         PATH_CALLBACK(temporal_zoom_in);
290         PATH_CALLBACK(temporal_zoom_out);
291         PATH_CALLBACK(scroll_up_1_track);
292         PATH_CALLBACK(scroll_dn_1_track);
293         PATH_CALLBACK(scroll_up_1_page);
294         PATH_CALLBACK(scroll_dn_1_page);
295
296 #define PATH_CALLBACK1(name,type,optional)                                      \
297         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
298                 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
299         } \
300         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *) { \
301                 OSC_DEBUG;              \
302                 if (argc > 0) {                                         \
303                         name (optional argv[0]->type);          \
304                 }                                                       \
305                 return 0;                                               \
306         }
307
308         PATH_CALLBACK1(set_transport_speed,f,);
309         PATH_CALLBACK1(access_action,s,&);
310
311         PATH_CALLBACK1(jump_by_bars,f,);
312         PATH_CALLBACK1(jump_by_seconds,f,);
313         PATH_CALLBACK1(master_set_gain,f,);
314         PATH_CALLBACK1(master_set_fader,i,);
315         PATH_CALLBACK1(master_set_trim,f,);
316         PATH_CALLBACK1(master_set_mute,i,);
317         PATH_CALLBACK1(monitor_set_gain,f,);
318         PATH_CALLBACK1(monitor_set_fader,i,);
319
320 #define PATH_CALLBACK1_MSG(name,arg1type)                       \
321         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
322                 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
323         } \
324         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \
325                 OSC_DEBUG;              \
326                 if (argc > 0) {                                         \
327                         name (argv[0]->arg1type, data); \
328                 }                                                       \
329                 return 0;                                               \
330         }
331
332         // pan position needs message info to send feedback
333         PATH_CALLBACK1_MSG(master_set_pan_stereo_position,f);
334
335         PATH_CALLBACK1_MSG(set_surface_bank_size,i);
336         PATH_CALLBACK1_MSG(set_surface_strip_types,i);
337         PATH_CALLBACK1_MSG(set_surface_feedback,i);
338         PATH_CALLBACK1_MSG(set_surface_gainmode,i);
339         PATH_CALLBACK1_MSG(sel_recenable,i);
340         PATH_CALLBACK1_MSG(sel_recsafe,i);
341         PATH_CALLBACK1_MSG(sel_mute,i);
342         PATH_CALLBACK1_MSG(sel_solo,i);
343         PATH_CALLBACK1_MSG(sel_solo_iso,i);
344         PATH_CALLBACK1_MSG(sel_solo_safe,i);
345         PATH_CALLBACK1_MSG(sel_monitor_input,i);
346         PATH_CALLBACK1_MSG(sel_monitor_disk,i);
347         PATH_CALLBACK1_MSG(sel_phase,i);
348         PATH_CALLBACK1_MSG(sel_gain,f);
349         PATH_CALLBACK1_MSG(sel_fader,f);
350         PATH_CALLBACK1_MSG(sel_trim,f);
351         PATH_CALLBACK1_MSG(sel_pan_position,f);
352         PATH_CALLBACK1_MSG(sel_pan_width,f);
353
354 #define PATH_CALLBACK2(name,arg1type,arg2type)                  \
355         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
356                 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
357         } \
358         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *) { \
359                 OSC_DEBUG;              \
360                 if (argc > 1) {                                         \
361                         name (argv[0]->arg1type, argv[1]->arg2type); \
362                 }                                                       \
363                 return 0;                                               \
364         }
365
366 #define PATH_CALLBACK2_MSG(name,arg1type,arg2type)                      \
367         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
368                 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
369         } \
370         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \
371                 OSC_DEBUG;              \
372                 if (argc > 1) {                                         \
373                         name (argv[0]->arg1type, argv[1]->arg2type, data); \
374                 }                                                       \
375                 return 0;                                               \
376         }
377
378 #define PATH_CALLBACK3(name,arg1type,arg2type,arg3type)                \
379         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
380                return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
381         } \
382         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \
383                 OSC_DEBUG;              \
384                 if (argc > 1) {                                                \
385                  name (argv[0]->arg1type, argv[1]->arg2type,argv[2]->arg3type, data); \
386                 }                                                      \
387                return 0;                                               \
388        }
389
390 #define PATH_CALLBACK4(name,arg1type,arg2type,arg3type,arg4type)               \
391         static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
392                return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
393         } \
394         int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \
395                 OSC_DEBUG;              \
396                 if (argc > 1) {                                                \
397                  name (argv[0]->arg1type, argv[1]->arg2type,argv[2]->arg3type,argv[3]->arg4type, data); \
398                 }                                                      \
399                return 0;                                               \
400        }
401
402         PATH_CALLBACK2_MSG(sel_sendgain,i,f);
403         PATH_CALLBACK2_MSG(sel_sendfader,i,f);
404         PATH_CALLBACK2_MSG(sel_sendenable,i,f);
405
406         PATH_CALLBACK4(set_surface,i,i,i,i);
407         PATH_CALLBACK2(locate,i,i);
408         PATH_CALLBACK2(loop_location,i,i);
409         PATH_CALLBACK2_MSG(route_mute,i,i);
410         PATH_CALLBACK2_MSG(route_solo,i,i);
411         PATH_CALLBACK2_MSG(route_solo_iso,i,i);
412         PATH_CALLBACK2_MSG(route_solo_safe,i,i);
413         PATH_CALLBACK2_MSG(route_recenable,i,i);
414         PATH_CALLBACK2_MSG(route_recsafe,i,i);
415         PATH_CALLBACK2_MSG(route_monitor_input,i,i);
416         PATH_CALLBACK2_MSG(route_monitor_disk,i,i);
417         PATH_CALLBACK2_MSG(strip_phase,i,i);
418         PATH_CALLBACK2_MSG(strip_select,i,i);
419         PATH_CALLBACK2_MSG(strip_gui_select,i,i);
420         PATH_CALLBACK2_MSG(route_set_gain_abs,i,f);
421         PATH_CALLBACK2_MSG(route_set_gain_dB,i,f);
422         PATH_CALLBACK2_MSG(route_set_gain_fader,i,f);
423         PATH_CALLBACK2_MSG(route_set_trim_dB,i,f);
424         PATH_CALLBACK2_MSG(route_set_pan_stereo_position,i,f);
425         PATH_CALLBACK2_MSG(route_set_pan_stereo_width,i,f);
426         PATH_CALLBACK3(route_set_send_gain_abs,i,i,f);
427         PATH_CALLBACK3(route_set_send_gain_dB,i,i,f);
428         PATH_CALLBACK3(route_set_send_fader,i,i,f);
429         PATH_CALLBACK3(route_set_send_enable,i,i,f);
430         PATH_CALLBACK4(route_plugin_parameter,i,i,i,f);
431         PATH_CALLBACK3(route_plugin_parameter_print,i,i,i);
432
433         int route_mute (int rid, int yn, lo_message msg);
434         int route_solo (int rid, int yn, lo_message msg);
435         int route_solo_iso (int rid, int yn, lo_message msg);
436         int route_solo_safe (int rid, int yn, lo_message msg);
437         int route_recenable (int rid, int yn, lo_message msg);
438         int route_recsafe (int ssid, int yn, lo_message msg);
439         int route_monitor_input (int rid, int yn, lo_message msg);
440         int route_monitor_disk (int rid, int yn, lo_message msg);
441         int strip_phase (int rid, int yn, lo_message msg);
442         int strip_select (int rid, int yn, lo_message msg);
443         int _strip_select (int rid, lo_address addr);
444         int strip_gui_select (int rid, int yn, lo_message msg);
445         int route_set_gain_abs (int rid, float level, lo_message msg);
446         int route_set_gain_dB (int rid, float dB, lo_message msg);
447         int route_set_gain_fader (int rid, float pos, lo_message msg);
448         int route_set_trim_abs (int rid, float level, lo_message msg);
449         int route_set_trim_dB (int rid, float dB, lo_message msg);
450         int route_set_pan_stereo_position (int rid, float left_right_fraction, lo_message msg);
451         int route_set_pan_stereo_width (int rid, float percent, lo_message msg);
452         int route_set_send_gain_abs (int rid, int sid, float val, lo_message msg);
453         int route_set_send_gain_dB (int rid, int sid, float val, lo_message msg);
454         int route_set_send_fader (int rid, int sid, float val, lo_message msg);
455         int route_set_send_enable (int rid, int sid, float val, lo_message msg);
456         int route_plugin_parameter (int rid, int piid,int par, float val, lo_message msg);
457         int route_plugin_parameter_print (int rid, int piid,int par, lo_message msg);
458
459         //banking functions
460         int set_bank (uint32_t bank_start, lo_message msg);
461         int _set_bank (uint32_t bank_start, lo_address addr);
462         int bank_up (lo_message msg);
463         int bank_down (lo_message msg);
464         int set_surface (uint32_t b_size, uint32_t strips, uint32_t fb, uint32_t gmode, lo_message msg);
465         int set_surface_bank_size (uint32_t bs, lo_message msg);
466         int set_surface_strip_types (uint32_t st, lo_message msg);
467         int set_surface_feedback (uint32_t fb, lo_message msg);
468         int set_surface_gainmode (uint32_t gm, lo_message msg);
469
470         int master_set_gain (float dB);
471         int master_set_fader (uint32_t position);
472         int master_set_trim (float dB);
473         int master_set_pan_stereo_position (float position, lo_message msg);
474         int master_set_mute (uint32_t state);
475         int monitor_set_gain (float dB);
476         int monitor_set_fader (uint32_t position);
477         int sel_recenable (uint32_t state, lo_message msg);
478         int sel_recsafe (uint32_t state, lo_message msg);
479         int sel_mute (uint32_t state, lo_message msg);
480         int sel_solo (uint32_t state, lo_message msg);
481         int sel_solo_iso (uint32_t state, lo_message msg);
482         int sel_solo_safe (uint32_t state, lo_message msg);
483         int sel_monitor_input (uint32_t state, lo_message msg);
484         int sel_monitor_disk (uint32_t state, lo_message msg);
485         int sel_phase (uint32_t state, lo_message msg);
486         int sel_gain (float state, lo_message msg);
487         int sel_fader (float state, lo_message msg);
488         int sel_trim (float val, lo_message msg);
489         int sel_pan_position (float val, lo_message msg);
490         int sel_pan_width (float val, lo_message msg);
491         int sel_sendgain (int id, float dB, lo_message msg);
492         int sel_sendfader (int id, float pos, lo_message msg);
493         int sel_sendenable (int id, float pos, lo_message msg);
494
495         void listen_to_route (boost::shared_ptr<ARDOUR::Stripable>, lo_address);
496         void end_listen (boost::shared_ptr<ARDOUR::Stripable>, lo_address);
497         void drop_route (boost::weak_ptr<ARDOUR::Stripable>);
498         void route_lost (boost::weak_ptr<ARDOUR::Stripable>);
499         void gui_selection_changed (ARDOUR::StripableNotificationListPtr stripables);
500
501         void route_name_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> r, lo_address addr);
502         void recalcbanks ();
503         void _recalcbanks ();
504         void notify_routes_added (ARDOUR::RouteList &);
505         void notify_vca_added (ARDOUR::VCAList &);
506
507         void update_clock ();
508         bool periodic (void);
509         sigc::connection periodic_connection;
510         PBD::ScopedConnectionList session_connections;
511
512         int route_send_fail (std::string path, uint32_t ssid, float val, lo_address addr);
513         int sel_send_fail (std::string path, uint32_t id, float val, lo_address addr);
514
515         typedef std::list<OSCRouteObserver*> RouteObservers;
516
517         RouteObservers route_observers;
518
519         typedef std::list<OSCGlobalObserver*> GlobalObservers;
520         GlobalObservers global_observers;
521
522         void debugmsg (const char *prefix, const char *path, const char* types, lo_arg **argv, int argc);
523
524         static OSC* _instance;
525
526         mutable void *gui;
527         void build_gui ();
528 };
529
530 } // namespace
531
532 #endif // ardour_osc_h