diff options
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/lv2_extensions.h | 38 | ||||
-rw-r--r-- | libs/ardour/ardour/lv2_plugin.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/plugin.h | 5 |
3 files changed, 49 insertions, 0 deletions
diff --git a/libs/ardour/ardour/lv2_extensions.h b/libs/ardour/ardour/lv2_extensions.h index 64fc3bc615..f38ac8122a 100644 --- a/libs/ardour/ardour/lv2_extensions.h +++ b/libs/ardour/ardour/lv2_extensions.h @@ -171,4 +171,42 @@ typedef struct _LV2_License_Interface { @} */ +/** + @defgroup midnam MIDI Naming + + @{ +*/ + + +#define LV2_MIDNAM_URI "http://ardour.org/lv2/midnam" +#define LV2_MIDNAM_PREFIX LV2_MIDNAM_URI "#" +#define LV2_MIDNAM__interface LV2_MIDNAM_PREFIX "interface" +#define LV2_MIDNAM__update LV2_MIDNAM_PREFIX "update" + +typedef void* LV2_Midnam_Handle; + +/** a LV2 Feature provided by the Host to the plugin */ +typedef struct { + /** Opaque host data */ + LV2_Midnam_Handle handle; + /** Request from run() that the host should re-read the midnam */ + void (*update)(LV2_Midnam_Handle handle); +} LV2_Midnam; + +typedef struct { + /** query midnam document. The plugin + * is expected to return an allocated + * null-terminated XML text, which is + * safe for the host to pass to free(). + * + * The midnam <Model> must be unique and + * specific for the given plugin-instance. + */ + char* (*midnam)(LV2_Handle instance); + char* (*model)(LV2_Handle instance); +} LV2_Midnam_Interface; + +/** + @} +*/ #endif diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index a1e38fda32..202ddbb240 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -278,6 +278,7 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee #ifdef LV2_EXTENDED const LV2_Inline_Display_Interface* _display_interface; + const LV2_Midnam_Interface* _midname_interface; #endif typedef struct { @@ -294,6 +295,7 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee LV2_Feature _def_state_feature; #ifdef LV2_EXTENDED LV2_Feature _queue_draw_feature; + LV2_Feature _midnam_feature; #endif // Options passed to plugin @@ -321,6 +323,10 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee #ifdef LV2_EXTENDED bool has_inline_display (); Plugin::Display_Image_Surface* render_inline_display (uint32_t, uint32_t); + + bool has_midnam (); + bool read_midnam (); + std::string midnam_model (); #endif void latency_compute_run (); diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 612091191e..7d35ac7c2e 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -166,6 +166,11 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent virtual Display_Image_Surface* render_inline_display (uint32_t, uint32_t) { return NULL; } PBD::Signal0<void> QueueDraw; + virtual bool has_midnam () { return false; } + virtual bool read_midnam () { return false; } + virtual std::string midnam_model () { return ""; } + PBD::Signal0<void> UpdateMidnam; + struct PresetRecord { PresetRecord () : valid (false) {} PresetRecord (const std::string& u, const std::string& l, bool s = true) : uri (u), label (l), user (s), valid (true) {} |