Centralize Parameter scaling
[ardour.git] / libs / ardour / ardour / plugin.h
index 374dca82c298f8cfd74531b7a46199d9b05b029f..c5eb7d31c9ab372b12e3fd13a8eda6fb862f5a6e 100644 (file)
@@ -103,6 +103,7 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
 
        virtual int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const = 0;
        virtual uint32_t nth_parameter (uint32_t which, bool& ok) const = 0;
+       virtual std::string parameter_label (uint32_t which) const;
        virtual void activate () = 0;
        virtual void deactivate () = 0;
        virtual void flush () { deactivate(); activate(); }
@@ -256,6 +257,9 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
         */
        PBD::Signal0<void> PresetDirty;
 
+       /** Emitted for preset-load to set a control-port */
+       PBD::Signal2<void, uint32_t, float> PresetPortSetValue;
+
        virtual bool has_editor () const = 0;
 
        /** Emitted when a parameter is altered by something outside of our
@@ -330,7 +334,7 @@ protected:
        /* Called when a parameter of the plugin is changed outside of this
         * host's control (typical via a plugin's own GUI/editor)
         */
-       void parameter_changed_externally (uint32_t which, float val);
+       virtual void parameter_changed_externally (uint32_t which, float val);
 
        /* should be overridden by plugin API specific derived types to
         * actually implement changing the parameter. The derived type should
@@ -358,8 +362,6 @@ private:
        /** Fill _presets with our presets */
        virtual void find_presets () = 0;
 
-       void update_presets (std::string src_unique_id, Plugin* src );
-
        /** Add state to an existing XMLNode */
        virtual void add_state (XMLNode *) const = 0;