summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/lv2_extensions.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-29 19:21:48 +0200
committerRobin Gareus <robin@gareus.org>2016-10-29 19:57:43 +0200
commit3f739738062eb5fd646a1a88a61019b453bbda7f (patch)
tree20785d499e1bd18a99d8bc851989813c1ecced64 /libs/ardour/ardour/lv2_extensions.h
parentf8167ebe20ea5d6e4e8d376dfae1b211887977e9 (diff)
Prototype LV2 extension for plugins to provide Midnams
Diffstat (limited to 'libs/ardour/ardour/lv2_extensions.h')
-rw-r--r--libs/ardour/ardour/lv2_extensions.h38
1 files changed, 38 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