aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-10 06:25:29 +0000
committerDavid Robillard <d@drobilla.net>2013-01-10 06:25:29 +0000
commitad6a1ddba3029405dacc93fb773817316c8ee3b3 (patch)
tree9028d1ae34e08d0874dc8de95a004c18b8e04e0c /src/jalv.c
parent6f80f7503bc2a556b53d3d895b9f028d5ef24b4e (diff)
downloadjalv-ad6a1ddba3029405dacc93fb773817316c8ee3b3.tar.gz
jalv-ad6a1ddba3029405dacc93fb773817316c8ee3b3.tar.bz2
jalv-ad6a1ddba3029405dacc93fb773817316c8ee3b3.zip
Support event-based file parameters in built-in UI.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@4913 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/jalv.c b/src/jalv.c
index dcc1425..7d29777 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -50,6 +50,7 @@
#include "lv2/lv2plug.in/ns/ext/event/event.h"
#include "lv2/lv2plug.in/ns/ext/options/options.h"
#include "lv2/lv2plug.in/ns/ext/parameters/parameters.h"
+#include "lv2/lv2plug.in/ns/ext/patch/patch.h"
#include "lv2/lv2plug.in/ns/ext/presets/presets.h"
#include "lv2/lv2plug.in/ns/ext/time/time.h"
#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h"
@@ -194,9 +195,8 @@ create_port(Jalv* jalv,
const LilvNode* symbol = lilv_port_get_symbol(jalv->plugin,
port->lilv_port);
- const bool optional = lilv_port_has_property(jalv->plugin,
- port->lilv_port,
- jalv->nodes.lv2_connectionOptional);
+ const bool optional = lilv_port_has_property(
+ jalv->plugin, port->lilv_port, jalv->nodes.lv2_connectionOptional);
/* Set the port flow (input or output) */
if (lilv_port_is_a(jalv->plugin, port->lilv_port, jalv->nodes.lv2_InputPort)) {
@@ -249,6 +249,12 @@ jalv_create_ports(Jalv* jalv)
create_port(jalv, i, default_values[i]);
}
+ const LilvPort* control_input = lilv_plugin_get_port_by_designation(
+ jalv->plugin, jalv->nodes.lv2_InputPort, jalv->nodes.lv2_control);
+ if (control_input) {
+ jalv->control_in = lilv_port_get_index(jalv->plugin, control_input);
+ }
+
free(default_values);
}
@@ -805,6 +811,9 @@ main(int argc, char** argv)
jalv.urids.log_Trace = symap_map(jalv.symap, LV2_LOG__Trace);
jalv.urids.midi_MidiEvent = symap_map(jalv.symap, LV2_MIDI__MidiEvent);
jalv.urids.param_sampleRate = symap_map(jalv.symap, LV2_PARAMETERS__sampleRate);
+ jalv.urids.patch_Set = symap_map(jalv.symap, LV2_PATCH__Set);
+ jalv.urids.patch_property = symap_map(jalv.symap, LV2_PATCH__property);
+ jalv.urids.patch_value = symap_map(jalv.symap, LV2_PATCH__value);
jalv.urids.time_Position = symap_map(jalv.symap, LV2_TIME__Position);
jalv.urids.time_bar = symap_map(jalv.symap, LV2_TIME__bar);
jalv.urids.time_barBeat = symap_map(jalv.symap, LV2_TIME__barBeat);
@@ -857,6 +866,7 @@ main(int argc, char** argv)
jalv.nodes.lv2_InputPort = lilv_new_uri(world, LV2_CORE__InputPort);
jalv.nodes.lv2_OutputPort = lilv_new_uri(world, LV2_CORE__OutputPort);
jalv.nodes.lv2_connectionOptional = lilv_new_uri(world, LV2_CORE__connectionOptional);
+ jalv.nodes.lv2_control = lilv_new_uri(world, LV2_CORE__control);
jalv.nodes.midi_MidiEvent = lilv_new_uri(world, LV2_MIDI__MidiEvent);
jalv.nodes.pset_Preset = lilv_new_uri(world, LV2_PRESETS__Preset);
jalv.nodes.rdfs_label = lilv_new_uri(world, LILV_NS_RDFS "label");