39 #include <glibmm/main.h>
41 #define ABSTRACT_UI_EXPORTS
124 typedef std::vector<std::shared_ptr<ARDOUR::Stripable> >
Sorted;
126 typedef std::map<std::shared_ptr<ARDOUR::AutomationControl>, uint32_t>
FakeTouchMap;
157 std::shared_ptr<ARDOUR::Stripable>
select;
326 uint32_t
get_sid (std::shared_ptr<ARDOUR::Stripable> strip, lo_address addr);
327 std::shared_ptr<ARDOUR::Stripable>
get_strip (uint32_t ssid, lo_address addr);
337 int current_value (
const char *path,
const char *types, lo_arg **argv,
int argc, lo_message msg,
void *user_data);
339 int catchall (
const char *path,
const char *types, lo_arg **argv,
int argc, lo_message msg);
340 static int _catchall (
const char *path,
const char *types, lo_arg **argv,
int argc, lo_message msg,
void *user_data);
342 int set_automation (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
343 int touch_detect (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
344 int fake_touch (std::shared_ptr<ARDOUR::AutomationControl> ctrl);
346 int spill (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
363 int cue_parse (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
366 int cue_new_aux (std::string
name, std::string dest_1, std::string dest_2, uint32_t count, lo_message msg);
376 std::shared_ptr<ARDOUR::Send>
cue_get_send (uint32_t
id, lo_address addr);
381 int parse_link (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
383 int set_link (uint32_t set, uint32_t
id, lo_address addr);
388 if (_debugmode == All) { \
389 debugmsg (dgettext(PACKAGE, "OSC"), path, types, argv, argc); \
392 #define PATH_CALLBACK_MSG(name) \
393 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
394 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
396 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
398 if (argc > 0 && !strcmp (types, "f") && argv[0]->f != 1.0) { return 0; } \
418 #define PATH_CALLBACK(name) \
419 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
420 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
422 int cb_ ## name (const char *path, const char *types, lo_arg ** argv, int argc, lo_message msg) { \
424 check_surface (msg); \
425 if (argc > 0 && !strcmp (types, "f") && argv[0]->f != 1.0) { return 0; } \
485 #define PATH_CALLBACK1(name,type,optional) \
486 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
487 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
489 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
491 check_surface (msg); \
493 name (optional argv[0]->type); \
512 #define PATH_CALLBACK1_MSG(name,arg1type) \
513 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
514 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
516 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
519 name (argv[0]->arg1type, msg); \
524 #define PATH_CALLBACK1_MSG_s(name,arg1type) \
525 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
526 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
528 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
531 name (&argv[0]->arg1type, msg); \
568 #define PATH_CALLBACK2(name,arg1type,arg2type) \
569 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
570 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
572 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
574 check_surface (msg); \
576 name (argv[0]->arg1type, argv[1]->arg2type); \
581 #define PATH_CALLBACK2_MSG(name,arg1type,arg2type) \
582 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
583 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
585 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
588 name (argv[0]->arg1type, argv[1]->arg2type, msg); \
593 #define PATH_CALLBACK2_MSG_s(name,arg1type,arg2type) \
594 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
595 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
597 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
600 name (argv[0]->arg1type, &argv[1]->arg2type, msg); \
605 #define PATH_CALLBACK3(name,arg1type,arg2type,arg3type) \
606 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
607 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
609 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
612 name (argv[0]->arg1type, argv[1]->arg2type,argv[2]->arg3type, msg); \
617 #define PATH_CALLBACK4(name,arg1type,arg2type,arg3type,arg4type) \
618 static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) { \
619 return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, msg); \
621 int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) { \
624 name (argv[0]->arg1type, argv[1]->arg2type,argv[2]->arg3type,argv[3]->arg4type, msg); \
656 int strip_parse (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
657 int master_parse (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
658 int monitor_parse (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
659 int _strip_parse (
const char *path,
const char *sub_path,
const char* types, lo_arg **argv,
int argc, std::shared_ptr<ARDOUR::Stripable> s,
int param_1,
bool strp, lo_message msg);
660 int strip_state (
const char *path, std::shared_ptr<ARDOUR::Stripable> s,
int ssid, lo_message msg);
683 int set_bank (uint32_t bank_start, lo_message msg);
690 int surface_parse (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
691 int set_surface (uint32_t b_size, uint32_t strips, uint32_t fb, uint32_t gmode, uint32_t se_size, uint32_t pi_size, lo_message msg);
703 int select_parse (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
714 int scrub (
float delta, lo_message msg);
715 int jog (
float delta, lo_message msg);
717 int set_marker (
const char* types, lo_arg **argv,
int argc, lo_message msg);
722 std::shared_ptr<ARDOUR::Send>
get_send (std::shared_ptr<ARDOUR::Stripable> st, lo_address addr);
748 int parse_sel_group (
const char *path,
const char* types, lo_arg **argv,
int argc, lo_message msg);
768 void debugmsg (
const char *prefix,
const char *path,
const char* types, lo_arg **argv,
int argc);
virtual std::string name() const
int custom_mode(float state, lo_message msg)
int route_plugin_descriptor(int ssid, int piid, lo_message msg)
int spill(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
uint32_t bank_limits_check(uint32_t bank, uint32_t size, uint32_t total)
void transport_sample(lo_message msg)
int sel_sendenable(int id, float pos, lo_message msg)
int jog_mode(float mode, lo_message msg)
int current_value(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
int monitor_parse(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
int name_session(char *n, lo_message msg)
void notify_routes_added(ARDOUR::RouteList &)
void notify_vca_added(ARDOUR::VCAList &)
int mixer_scene_state(lo_address addr, bool zero_it=false)
int sel_previous(lo_message msg)
int cue_new_send(std::string rt_name, lo_message msg)
void set_send_size(int ss)
int sel_comp_makeup(float val, lo_message msg)
void processor_changed(std::string remote_url)
std::string _osc_unix_socket_path
int use_group(float value, lo_message msg)
int set_automation(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
std::shared_ptr< ARDOUR::Stripable > get_strip(uint32_t ssid, lo_address addr)
void surface_link_state(LinkSet *set)
OSCDebugMode get_debug_mode()
int click_level(float position)
int set_surface(uint32_t b_size, uint32_t strips, uint32_t fb, uint32_t gmode, uint32_t se_size, uint32_t pi_size, lo_message msg)
FakeTouchMap _touch_timeout
int cue_new_aux(std::string name, std::string dest_1, std::string dest_2, uint32_t count, lo_message msg)
int _custom_mode(uint32_t state, lo_address addr)
int route_plugin_deactivate(int rid, int piid, lo_message msg)
int sel_next(lo_message msg)
int int_message_with_id(std::string, uint32_t ssid, int value, bool in_line, lo_address addr)
int _strip_parse(const char *path, const char *sub_path, const char *types, lo_arg **argv, int argc, std::shared_ptr< ARDOUR::Stripable > s, int param_1, bool strp, lo_message msg)
void do_request(OSCUIRequest *)
int send_group_list(lo_address addr)
Sorted get_sorted_stripables(std::bitset< 32 > types, bool cue, uint32_t custom, Sorted my_list)
int cue_parse(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
std::vector< std::shared_ptr< ARDOUR::Stripable > > Sorted
void set_gainmode(int gm)
int set_surface_gainmode(uint32_t gm, lo_message msg)
std::vector< PortAdd > _ports
int fake_touch(std::shared_ptr< ARDOUR::AutomationControl > ctrl)
std::shared_ptr< ARDOUR::Stripable > _select
int set_surface_strip_types(uint32_t st, lo_message msg)
int sel_comp_mode(float val, lo_message msg)
int set_link(uint32_t set, uint32_t id, lo_address addr)
int trigger_grid_state(lo_address addr, bool zero_it=false)
int sel_master_send_enable(int state, lo_message msg)
int route_set_send_enable(int rid, int sid, float val, lo_message msg)
int sel_expand(uint32_t state, lo_message msg)
int sel_send_pagesize(uint32_t size, lo_message msg)
void route_name_changed(const PBD::PropertyChange &, std::weak_ptr< ARDOUR::Route > r, lo_address addr)
int sel_eq_lpf_enable(float val, lo_message msg)
int strip_state(const char *path, std::shared_ptr< ARDOUR::Stripable > s, int ssid, lo_message msg)
int sel_eq_gain(int id, float val, lo_message msg)
int route_set_send_fader(int rid, int sid, float val, lo_message msg)
int strip_list(lo_message msg)
int route_plugin_parameter(int rid, int piid, int par, float val, lo_message msg)
int _strip_select2(std::shared_ptr< ARDOUR::Stripable > s, OSCSurface *sur, lo_address addr)
int cue_aux_mute(float state, lo_message msg)
int sel_comp_threshold(float val, lo_message msg)
int parse_sel_group(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
std::string get_remote_port()
int text_message_with_id(std::string path, uint32_t ssid, std::string val, bool in_line, lo_address addr)
void current_value_query(const char *path, size_t len, lo_arg **argv, int argc, lo_message msg)
int int_message(std::string, int value, lo_address addr)
std::map< uint32_t, LinkSet > link_sets
void set_remote_port(std::string pt)
int sel_plug_page(int page, lo_message msg)
Sorted cue_get_sorted_stripables(std::shared_ptr< ARDOUR::Stripable > aux, uint32_t id, lo_address)
int get_defaultfeedback()
std::map< std::shared_ptr< ARDOUR::AutomationControl >, uint32_t > FakeTouchMap
void surface_destroy(OSCSurface *sur)
void add_marker_name(const std::string &markername)
void loop_location(int start, int end)
int custom_clear(lo_message msg)
int route_plugin_parameter_print(int rid, int piid, int par, lo_message msg)
int trigger_stop(int rid, int row_id, lo_message msg)
void cue_set_aux(uint32_t aux, lo_message msg)
int catchall(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
std::string get_unix_server_url()
int float_message(std::string, float value, lo_address addr)
lo_server _osc_unix_server
int sel_send_page(int page, lo_message msg)
int sel_eq_lpf_slope(float val, lo_message msg)
int sel_eq_hpf_slope(float val, lo_message msg)
int check_surface(lo_message msg)
std::string get_port(std::string host)
int sel_plugin_activate(float state, lo_message msg)
int sel_pan_frontback(float val, lo_message msg)
void link_strip_types(uint32_t linkset, uint32_t striptypes)
PBD::ScopedConnectionList session_connections
int set_temp_mode(lo_address addr)
void session_exported(std::string, std::string)
int sel_plugin(int delta, lo_message msg)
void set_defaultstrip(int st)
void route_added(ARDOUR::RouteList &)
void stripable_selection_changed()
int sel_eq_enable(float val, lo_message msg)
int cue_set(uint32_t aux, lo_message msg)
OSC(ARDOUR::Session &, uint32_t port)
int sel_plug_pagesize(uint32_t size, lo_message msg)
void set_debug_mode(OSCDebugMode m)
int master_parse(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
int trigger_unbang(int rid, int stop_now, lo_message msg)
ARDOUR::ZeroConf * _zeroconf
std::string get_server_url()
int sel_sendfader(int id, float pos, lo_message msg)
lo_address get_address(lo_message msg)
int bank_down(lo_message msg)
sigc::connection periodic_connection
int route_plugin_activate(int rid, int piid, lo_message msg)
int link_check(uint32_t linkset)
int sel_delta(int delta, lo_message msg)
void transport_speed(lo_message msg)
OSCSurface * get_surface(lo_address addr, bool quiet=false)
uint32_t default_gainmode
int set_bank(uint32_t bank_start, lo_message msg)
void set_plugin_size(int ps)
uint32_t get_sid(std::shared_ptr< ARDOUR::Stripable > strip, lo_address addr)
int route_plugin_list(int ssid, lo_message msg)
int sel_eq_shape(int id, float val, lo_message msg)
LinkSet * get_linkset(uint32_t set, lo_address addr)
void send_current_value(const char *path, lo_arg **argv, int argc, lo_message msg)
int select_plugin_parameter(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
void routes_list(lo_message msg)
int set_surface_feedback(uint32_t fb, lo_message msg)
std::vector< OSCSurface > Surface
void session_loaded(ARDOUR::Session &)
int cue_next(lo_message msg)
int cue_connect_aux(std::string dest, lo_message msg)
int route_get_sends(lo_message msg)
int scrub(float delta, lo_message msg)
int sel_new_personal_send(char *n, lo_message msg)
Glib::Threads::Mutex _lo_lock
uint32_t default_banksize
int cue_send_enable(uint32_t id, float state, lo_message msg)
int strip_parse(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
int sel_eq_freq(int id, float val, lo_message msg)
int set_surface_port(uint32_t po, lo_message msg)
int trigger_bang(int rid, int stop_now, lo_message msg)
int _cue_set(uint32_t aux, lo_address addr)
int group_list(lo_message msg)
int set_state(const XMLNode &, int version)
int sel_eq_hpf_enable(float val, lo_message msg)
int refresh_surface(lo_message msg)
int route_set_send_gain_dB(int rid, int sid, float val, lo_message msg)
int cue_aux_fader(float position, lo_message msg)
int set_marker(const char *types, lo_arg **argv, int argc, lo_message msg)
std::string _osc_url_file
int sel_eq_hpf_freq(float val, lo_message msg)
int sel_pan_elevation(float val, lo_message msg)
int _strip_select(std::shared_ptr< ARDOUR::Stripable > s, lo_address addr)
int parse_link(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
int float_message_with_id(std::string, uint32_t ssid, float value, bool in_line, lo_address addr)
int touch_detect(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
int route_plugin_reset(int ssid, int piid, lo_message msg)
void surface_list(lo_message msg)
int trigger_bank_state(lo_address addr)
int surface_parse(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
static int _catchall(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
int text_message(std::string path, std::string val, lo_address addr)
void debugmsg(const char *prefix, const char *path, const char *types, lo_arg **argv, int argc)
int sel_sendgain(int id, float dB, lo_message msg)
void set_defaultfeedback(int fb)
void register_callbacks()
void record_enabled(lo_message msg)
int cue_send_fader(uint32_t id, float position, lo_message msg)
void set_banksize(int bs)
Glib::Threads::Mutex surfaces_lock
uint32_t default_plugin_size
int route_get_receives(lo_message msg)
int jog(float delta, lo_message msg)
int _sel_plugin(int id, lo_address addr)
std::shared_ptr< ARDOUR::VCA > get_vca_by_name(std::string vname)
int osc_tbank_step_rows(int step, lo_message msg)
CONTROL_PROTOCOL_THREADS_NEED_TEMPO_MAP_DECL()
std::shared_ptr< ARDOUR::Send > get_send(std::shared_ptr< ARDOUR::Stripable > st, lo_address addr)
int sel_eq_q(int id, float val, lo_message msg)
void listen_to_route(std::shared_ptr< ARDOUR::Stripable >, lo_address)
void global_feedback(OSCSurface *sur)
uint32_t default_send_size
bool osc_input_handler(Glib::IOCondition, lo_server)
int sel_pan_lfe(float val, lo_message msg)
int cue_previous(lo_message msg)
void bank_leds(OSCSurface *sur)
void set_portmode(int pm)
int bank_delta(float delta, lo_message msg)
int sel_eq_lpf_freq(float val, lo_message msg)
int _set_bank(uint32_t bank_start, lo_address addr)
int osc_toggle_roll(bool ret2strt)
int bank_up(lo_message msg)
int sel_comp_enable(float val, lo_message msg)
int select_parse(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
uint32_t default_feedback
int set_surface_bank_size(uint32_t bs, lo_message msg)
std::shared_ptr< ARDOUR::Send > cue_get_send(uint32_t id, lo_address addr)
XMLNode & get_state() const
void strip_feedback(OSCSurface *sur, bool new_bank_size)
int osc_tbank_step_routes(int step, lo_message msg)
void apply_mixer_scene(int scn)
void locate(ARDOUR::samplepos_t sample, ARDOUR::LocateTransportDisposition ltd)
void remove_marker_at_playhead()
void trigger_cue_row(int cue)
void add_marker(const std::string &=std::string())
void store_mixer_scene(int scn)
void quick_snapshot_stay()
void access_action(std::string action_path)
void goto_start(bool and_roll=false)
void tbank_set_size(int route_width, int row_height)
void trigger_stop_all(bool stop_now=false)
void quick_snapshot_switch()
void toggle_all_rec_enables()
void jump_by_bars(int bars, ARDOUR::LocateTransportDisposition ltd=ARDOUR::RollIfAppropriate)
ARDOUR::samplepos_t transport_sample()
void jump_by_seconds(double sec, ARDOUR::LocateTransportDisposition ltd=ARDOUR::RollIfAppropriate)
void set_transport_speed(double speed)
void transport_play(bool jump_back=false)
void toggle_monitor_mono()
void all_tracks_rec_out()
void toggle_monitor_dim()
void toggle_monitor_mute()
std::list< std::shared_ptr< VCA > > VCAList
std::list< std::shared_ptr< Route > > RouteList
#define PATH_CALLBACK1(name, type, optional)
#define PATH_CALLBACK3(name, arg1type, arg2type, arg3type)
#define PATH_CALLBACK_MSG(name)
#define PATH_CALLBACK(name)
#define PATH_CALLBACK2_MSG(name, arg1type, arg2type)
#define PATH_CALLBACK1_MSG_s(name, arg1type)
#define PATH_CALLBACK2(name, arg1type, arg2type)
#define PATH_CALLBACK4(name, arg1type, arg2type, arg3type, arg4type)
#define PATH_CALLBACK1_MSG(name, arg1type)
std::bitset< 32 > strip_types
std::vector< std::string > urls
std::shared_ptr< ARDOUR::Stripable > temp_master
OSCSelectObserver * sel_obs
std::shared_ptr< ARDOUR::Stripable > select
std::vector< int > plug_params
std::bitset< 32 > feedback
OSCGlobalObserver * global_obs
std::vector< int > plugins
PBD::Controllable::GroupControlDisposition usegroup
PBD::ScopedConnection proc_connection
std::vector< OSCRouteObserver * > observers
std::bitset< 32 > strip_types
std::shared_ptr< ARDOUR::Stripable > expand_strip
std::shared_ptr< ARDOUR::Stripable > temp_master