cont'd work on plugin-state templates - #6709
[ardour.git] / libs / ardour / ardour / route.h
index 2b80ea9a151515741a7b352d213038dfaf84a01c..0ef063b29cf0d27339e0524037bc203cea523d98 100644 (file)
@@ -101,7 +101,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
        void set_comment (std::string str, void *src);
 
        bool set_name (const std::string& str);
-       static void set_name_in_state (XMLNode &, const std::string &);
+       static void set_name_in_state (XMLNode &, const std::string &, bool rename_playlist = true);
 
         uint32_t order_key () const;
         bool has_order_key () const;
@@ -410,7 +410,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
                boost::weak_ptr<Route> _route;
        };
 
-       class PhaseControllable : public AutomationControl {
+       class LIBARDOUR_API PhaseControllable : public AutomationControl {
        public:
                PhaseControllable (std::string name, boost::shared_ptr<Route>);
                void set_value (double);
@@ -423,6 +423,14 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
                uint32_t _current_phase;
        };
 
+       class LIBARDOUR_API GroupGainControllable : public AutomationControl {
+       public:
+               GroupGainControllable (std::string name, boost::shared_ptr<Route>);
+               void set_value (double);
+               double get_value () const;
+       private:
+               boost::weak_ptr<Route> _route;
+       };
 
        boost::shared_ptr<SoloControllable> solo_control() const {
                return _solo_control;
@@ -440,6 +448,10 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
                return _phase_control;
        }
 
+       boost::shared_ptr<GroupGainControllable> group_gain_control() const {
+               return _group_gain_control;
+       }
+
        /* Route doesn't own these items, but sub-objects that it does own have them
           and to make UI code a bit simpler, we provide direct access to them
           here.
@@ -461,6 +473,50 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
        boost::shared_ptr<Processor> the_instrument() const;
         InstrumentInfo& instrument_info() { return _instrument_info; }
 
+        /* "well-known" controls for panning. Any or all of these may return
+         * null.
+         */
+
+        boost::shared_ptr<AutomationControl> pan_azimuth_control() const;
+        boost::shared_ptr<AutomationControl> pan_elevation_control() const;
+        boost::shared_ptr<AutomationControl> pan_width_control() const;
+        boost::shared_ptr<AutomationControl> pan_frontback_control() const;
+        boost::shared_ptr<AutomationControl> pan_lfe_control() const;
+
+        /* "well-known" controls for an EQ in this route. Any or all may
+         * be null. eq_band_cnt() must return 0 if there is no EQ present.
+         * Passing an @param band value >= eq_band_cnt() will guarantee the
+         * return of a null ptr (or an empty string for eq_band_name()).
+         */
+        uint32_t eq_band_cnt () const;
+        std::string eq_band_name (uint32_t) const;
+        boost::shared_ptr<AutomationControl> eq_gain_controllable (uint32_t band) const;
+        boost::shared_ptr<AutomationControl> eq_freq_controllable (uint32_t band) const;
+        boost::shared_ptr<AutomationControl> eq_q_controllable (uint32_t band) const;
+        boost::shared_ptr<AutomationControl> eq_shape_controllable (uint32_t band) const;
+        boost::shared_ptr<AutomationControl> eq_enable_controllable () const;
+        boost::shared_ptr<AutomationControl> eq_hpf_controllable () const;
+
+        /* "well-known" controls for a compressor in this route. Any or all may
+         * be null.
+         */
+        boost::shared_ptr<AutomationControl> comp_enable_controllable () const;
+        boost::shared_ptr<AutomationControl> comp_threshold_controllable () const;
+        boost::shared_ptr<AutomationControl> comp_speed_controllable () const;
+        boost::shared_ptr<AutomationControl> comp_mode_controllable () const;
+        boost::shared_ptr<AutomationControl> comp_makeup_controllable () const;
+        boost::shared_ptr<AutomationControl> comp_redux_controllable () const;
+
+        /* @param mode must be supplied by the comp_mode_controllable(). All other values
+         * result in undefined behaviour
+         */
+        std::string comp_mode_name (uint32_t mode) const;
+        /* @param mode - as for comp mode name. This returns the name for the
+         * parameter/control accessed via comp_speed_controllable(), which can
+         * be mode dependent.
+         */
+        std::string comp_speed_name (uint32_t mode) const;
+
        void protect_automation ();
 
        enum {
@@ -579,6 +635,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
        boost::shared_ptr<MuteControllable> _mute_control;
        boost::shared_ptr<MuteMaster> _mute_master;
        boost::shared_ptr<PhaseControllable> _phase_control;
+       boost::shared_ptr<GroupGainControllable> _group_gain_control;
 
        virtual void act_on_mute () {}
 
@@ -657,6 +714,8 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
        void setup_invisible_processors ();
        void unpan ();
 
+       void set_plugin_state_dir (boost::weak_ptr<Processor>, const std::string&);
+
        boost::shared_ptr<CapturingProcessor> _capturing_processor;
 
        /** A handy class to keep processor state while we attempt a reconfiguration