summaryrefslogtreecommitdiffstats
path: root/src/server/LV2Node.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-11 05:22:08 +0000
committerDavid Robillard <d@drobilla.net>2012-03-11 05:22:08 +0000
commit4c299323440923891b9c583a354116000eb143cc (patch)
treef2873fdd9849561608b7eebbfad89c04d56ba58e /src/server/LV2Node.cpp
parentc2ea4e3c59ce8c06066780d67237fdb07255c89e (diff)
downloadingen-4c299323440923891b9c583a354116000eb143cc.tar.gz
ingen-4c299323440923891b9c583a354116000eb143cc.tar.bz2
ingen-4c299323440923891b9c583a354116000eb143cc.zip
Implement cv:CVPort (fix #790). Not well-tested, but at least works somewhat.
Use new style LV2 URI defines (and fix invalid atom URIs). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4050 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/LV2Node.cpp')
-rw-r--r--src/server/LV2Node.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/LV2Node.cpp b/src/server/LV2Node.cpp
index 91226c7b..2ff24538 100644
--- a/src/server/LV2Node.cpp
+++ b/src/server/LV2Node.cpp
@@ -96,7 +96,7 @@ LV2Node::prepare_poly(BufferFactory& bufs, uint32_t poly)
PortImpl* const port = _ports->at(j);
Buffer* const buffer = port->prepared_buffer(i).get();
if (buffer) {
- if (port->is_a(PortType::CONTROL)) {
+ if (port->is_a(PortType::CONTROL) || port->is_a(PortType::CONTROL)) {
((AudioBuffer*)buffer)->set_value(port->value().get_float(), 0, 0);
} else {
buffer->clear();
@@ -229,6 +229,8 @@ LV2Node::instantiate(BufferFactory& bufs)
PortType data_type = PortType::UNKNOWN;
if (lilv_port_is_a(plug, id, info->control_class)) {
data_type = PortType::CONTROL;
+ } else if (lilv_port_is_a(plug, id, info->cv_class)) {
+ data_type = PortType::CV;
} else if (lilv_port_is_a(plug, id, info->audio_class)) {
data_type = PortType::AUDIO;
} else if (lilv_port_is_a(plug, id, info->event_class)) {
@@ -287,7 +289,8 @@ LV2Node::instantiate(BufferFactory& bufs)
else
port = new OutputPort(bufs, this, port_name, j, _polyphony, data_type, val);
- if (direction == INPUT && data_type == PortType::CONTROL) {
+ if (direction == INPUT && (data_type == PortType::CONTROL
+ || data_type == PortType::CV)) {
port->set_value(val);
if (!isnan(min_values[j])) {
port->set_property(uris.lv2_minimum, min_values[j]);