diff --git a/kx-control-input-port-change-request.lv2/control-input-port-change-request.doap.ttl b/kx-control-input-port-change-request.lv2/control-input-port-change-request.doap.ttl new file mode 100644 index 0000000..003a160 --- /dev/null +++ b/kx-control-input-port-change-request.lv2/control-input-port-change-request.doap.ttl @@ -0,0 +1,25 @@ +@prefix dcs: . +@prefix doap: . +@prefix foaf: . +@prefix rdfs: . + + + a doap:Project ; + rdfs:seeAlso <../kx-meta/meta.ttl> ; + doap:license ; + doap:name "ControlPort Change Request" ; + doap:homepage ; + doap:created "2020-10-14" ; + doap:shortdesc "LV2 extension for allowing plugins to request changes on their own control input ports." ; + doap:developer ; + doap:maintainer ; + doap:release [ + doap:revision "0.0" ; + doap:created "2020-10-14" ; + doap:file-release ; + dcs:changeset [ + dcs:item [ + rdfs:label "First stable release." + ] + ] + ] . diff --git a/kx-control-input-port-change-request.lv2/control-input-port-change-request.h b/kx-control-input-port-change-request.lv2/control-input-port-change-request.h new file mode 100644 index 0000000..cdd4e89 --- /dev/null +++ b/kx-control-input-port-change-request.lv2/control-input-port-change-request.h @@ -0,0 +1,72 @@ +/* + LV2 ControlInputPort change request extension + Copyright 2020 Filipe Coelho + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + +/** + @file control-input-port-change-request.h + C header for the LV2 ControlInputPort change request extension . +*/ + +#ifndef LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H +#define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H + +#include "lv2/lv2plug.in/ns/lv2core/lv2.h" + +#define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "http://kx.studio/ns/lv2ext/control-input-port-change-request" +#define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_PREFIX LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "#" + +#ifdef __cplusplus +extern "C" { +#else +#include +#endif + +typedef void* LV2_ControlInputPort_Change_Request_Handle; + +/** + * On instantiation, host must supply LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI feature. + * LV2_Feature::data must be pointer to LV2_ControlInputPort_Change_Request. +*/ +typedef struct _LV2_ControlInputPort_Change_Request { + /** + * Opaque host data. + */ + LV2_ControlInputPort_Change_Request_Handle handle; + + /** + * request_change() + * + * Ask the host to change a plugin's control input port value. + * Parameter handle MUST be the 'handle' member of this struct. + * Parameter index is port index to change. + * Parameter value is the requested value to change the control port input to. + * + * Returns if the operation succeeded. + * The host may decline this request if it is e.g. currently automating this port. + * + * The plugin MUST call this function during run(). + */ + bool (*request_change)(LV2_ControlPortChangeRequest_Handle handle, + uint32_t index, + float value); + +} LV2_ControlInputPort_Change_Request; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H */ diff --git a/kx-control-input-port-change-request.lv2/control-input-port-change-request.ttl b/kx-control-input-port-change-request.lv2/control-input-port-change-request.ttl new file mode 100644 index 0000000..04d325a --- /dev/null +++ b/kx-control-input-port-change-request.lv2/control-input-port-change-request.ttl @@ -0,0 +1,15 @@ +@prefix lv2: . +@prefix owl: . +@prefix rdfs: . + + + a owl:Ontology , + lv2:Feature ; + rdfs:seeAlso , + , + <../kx-meta/meta.ttl> ; + lv2:documentation """ +

+ LV2 Programs is an LV2 Extension for allowing plugins to request changes on their own control input ports. +

+""" . diff --git a/kx-control-input-port-change-request.lv2/manifest.ttl b/kx-control-input-port-change-request.lv2/manifest.ttl new file mode 100644 index 0000000..adfee5f --- /dev/null +++ b/kx-control-input-port-change-request.lv2/manifest.ttl @@ -0,0 +1,8 @@ +@prefix lv2: . +@prefix rdfs: . + + + a lv2:Specification ; + lv2:minorVersion 0 ; + lv2:microVersion 0 ; + rdfs:seeAlso .