[LV2] [PATCH - Signal Data change 1/1] lv2core: Add feature to indicate that host signals data change

twischer at de.adit-jv.com twischer at de.adit-jv.com
Wed Apr 11 23:42:05 PDT 2018


From: Timo Wischer <twischer at de.adit-jv.com>

This feature can be provided by the Lv2 host. If it is provided the Lv2
host guarantees that connect_port() will be called for each input control
port which has changed since the last run() call.

If this feature is not supported the Lv2 plugin has to compare the port
data by its own to detect a change.

Therefore an Lv2 plugin can easily be adapted to also be used with a
simple Lv2 host which does not support this feature.

When using the patch extension the Lv2 plugin can only be used with Lv2
hosts supporting the patch extension. A bigger effort is required for the
Lv2 plugin to support a fall back implementation which does not require
the patch extension.

Signed-off-by: Timo Wischer <twischer at de.adit-jv.com>

diff --git a/lv2/lv2plug.in/ns/lv2core/lv2.h b/lv2/lv2plug.in/ns/lv2core/lv2.h
index eaca514..96f294e 100644
--- a/lv2/lv2plug.in/ns/lv2core/lv2.h
+++ b/lv2/lv2plug.in/ns/lv2core/lv2.h
@@ -116,6 +116,7 @@
 #define LV2_CORE__requiredFeature    LV2_CORE_PREFIX "requiredFeature"     ///< http://lv2plug.in/ns/lv2core#requiredFeature
 #define LV2_CORE__sampleRate         LV2_CORE_PREFIX "sampleRate"          ///< http://lv2plug.in/ns/lv2core#sampleRate
 #define LV2_CORE__scalePoint         LV2_CORE_PREFIX "scalePoint"          ///< http://lv2plug.in/ns/lv2core#scalePoint
+#define LV2_CORE__signalsDataChange  LV2_CORE_PREFIX "signalsDataChange"   ///< http://lv2plug.in/ns/lv2core#signalsDataChange
 #define LV2_CORE__symbol             LV2_CORE_PREFIX "symbol"              ///< http://lv2plug.in/ns/lv2core#symbol
 #define LV2_CORE__toggled            LV2_CORE_PREFIX "toggled"             ///< http://lv2plug.in/ns/lv2core#toggled
 
diff --git a/lv2/lv2plug.in/ns/lv2core/lv2core.ttl b/lv2/lv2plug.in/ns/lv2core/lv2core.ttl
index dd3e6bd..8d25aad 100644
--- a/lv2/lv2plug.in/ns/lv2core/lv2core.ttl
+++ b/lv2/lv2plug.in/ns/lv2core/lv2core.ttl
@@ -746,6 +746,18 @@ plugin MUST satisfy all of the following:</p>
 <p>Note these rules apply to the connect_port() function as well as run().</p>
 """ .
 
+lv2:signalsDataChange
+	a lv2:Feature ;
+	rdfs:label "signals data change" ;
+	lv2:documentation """
+This feature indicates that the Lv2 host will call connect_port() for the 
+corresponding control input port whenever its data has changed.
+Therefore the Lv2 plugin does not need to compare the current control port data
+with the old one to detect whether the data has changed.
+""" .
+
+be called when ever a 
+
 lv2:PortProperty
 	a rdfs:Class ,
 		owl:Class ;
-- 
2.7.4



More information about the Devel mailing list