MSVC won't allow us to cast directly from float to an enum. We need to kludge it...
[ardour.git] / libs / surfaces / osc / osc.h
index 45daead1a834ee33d2bb9311e581c885f07fa674..f7284063f5916e01664c50121a304e8e27f0448c 100644 (file)
@@ -109,6 +109,17 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
                All
        };
 
+       enum OSCCustomMode {
+               CusOff = 0,
+               CusRawOrder = 1,
+               CusSort =2,
+               CusFilterRaw = 5,
+               CusFilter = 6,
+               GroupOnly = 7,
+               VCAOnly = 8,
+               BusOnly = 9
+       };
+
        typedef std::vector<boost::shared_ptr<ARDOUR::Stripable> > Sorted;
        Sorted get_sorted_stripables(std::bitset<32> types, bool cue, uint32_t custom, Sorted my_list);
        typedef std::map<boost::shared_ptr<ARDOUR::AutomationControl>, uint32_t> FakeTouchMap;
@@ -127,7 +138,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
                int gainmode;                           // what kind of faders do we have Gain db or position 0 to 1?
                PBD::Controllable::GroupControlDisposition usegroup;    // current group disposition
                Sorted custom_strips;           // a sorted list of user selected strips
-               uint32_t custom_mode;                   // use custom strip list
+               OSCCustomMode custom_mode;      // use custom strip list
+               Sorted temp_strips;                     // temp strip list for grouponly, vcaonly, auxonly
                Sorted strips;                          // list of stripables for this surface
                // strips
                uint32_t bank;                          // current bank
@@ -190,7 +202,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
                bool autobank;                                  // banksize is derived from total
                uint32_t not_ready;                             // number of 1st device, 0 = ready
                Sorted custom_strips;                   // a sorted list of user selected strips
-               uint32_t custom_mode;                   // use custom strip list
+               OSCCustomMode custom_mode;      // use custom strip list
+               Sorted temp_strips;                     // temp strip list for grouponly, vcaonly, auxonly
                std::bitset<32> strip_types;    // strip_types for this linkset
                Sorted strips;                                  // list of valid strips in order for this set
        };
@@ -352,6 +365,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        PATH_CALLBACK_MSG(route_get_receives);
        PATH_CALLBACK_MSG(routes_list);
        PATH_CALLBACK_MSG(group_list);
+       PATH_CALLBACK_MSG(sel_bus_only);
        PATH_CALLBACK_MSG(surface_list);
        PATH_CALLBACK_MSG(transport_sample);
        PATH_CALLBACK_MSG(transport_speed);
@@ -493,8 +507,9 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        PATH_CALLBACK1_MSG(jog_mode,f);
        PATH_CALLBACK1_MSG(bank_delta,f);
        PATH_CALLBACK1_MSG(use_group,f);
-       PATH_CALLBACK1_MSG_s(sel_group,s);
+       PATH_CALLBACK1_MSG_s(name_session,s);
        PATH_CALLBACK1_MSG_s(sel_rename,s);
+       PATH_CALLBACK1_MSG_s(sel_comment,s);
        PATH_CALLBACK1_MSG(sel_recenable,i);
        PATH_CALLBACK1_MSG(sel_recsafe,i);
        PATH_CALLBACK1_MSG(sel_mute,i);
@@ -621,6 +636,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        PATH_CALLBACK2_MSG(strip_gui_select,i,i);
        PATH_CALLBACK2_MSG(route_set_gain_dB,i,f);
        PATH_CALLBACK2_MSG(route_set_gain_fader,i,f);
+       PATH_CALLBACK2_MSG(strip_db_delta,i,f);
        PATH_CALLBACK2_MSG(route_set_trim_dB,i,f);
        PATH_CALLBACK2_MSG(route_set_pan_stereo_position,i,f);
        PATH_CALLBACK2_MSG(route_set_pan_stereo_width,i,f);
@@ -687,6 +703,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        int refresh_surface (lo_message msg);
        int custom_clear (lo_message msg);
        int custom_mode (float state, lo_message msg);
+       int _custom_mode (OSCCustomMode state, lo_address addr);
+       int name_session (char *n, lo_message msg);
        // select
        int sel_send_pagesize (uint32_t size, lo_message msg);
        int sel_send_page (int page, lo_message msg);
@@ -718,6 +736,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        int monitor_set_mono (uint32_t state);
        int sel_group (char *g, lo_message msg);
        int sel_rename (char *n, lo_message msg);
+       int sel_comment (char *c, lo_message msg);
        int sel_recenable (uint32_t state, lo_message msg);
        int sel_recsafe (uint32_t state, lo_message msg);
        int sel_mute (uint32_t state, lo_message msg);
@@ -732,6 +751,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        int sel_dB_delta (float delta, lo_message msg);
        int sel_trim (float val, lo_message msg);
        int sel_hide (uint32_t state, lo_message msg);
+       int sel_bus_only (lo_message msg);
+       boost::shared_ptr<ARDOUR::Send> get_send (boost::shared_ptr<ARDOUR::Stripable> st, lo_address addr);
        int sel_pan_position (float val, lo_message msg);
        int sel_pan_width (float val, lo_message msg);
        int sel_sendgain (int id, float dB, lo_message msg);
@@ -758,6 +779,9 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
        int sel_eq_freq (int id, float val, lo_message msg);
        int sel_eq_q (int id, float val, lo_message msg);
        int sel_eq_shape (int id, float val, lo_message msg);
+       int parse_sel_group (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg);
+       int parse_sel_vca (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg);
+       boost::shared_ptr<ARDOUR::VCA> get_vca_by_name (std::string vname);
 
        void listen_to_route (boost::shared_ptr<ARDOUR::Stripable>, lo_address);