summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-14 02:33:14 +0000
committerDavid Robillard <d@drobilla.net>2010-02-14 02:33:14 +0000
commit8e39e60112ff2a86587436edbde31dc1030bb681 (patch)
treea0b3e44fca9748928dba8357ee043459addf425e /src
parentfa2a13801862a379d367afa29497dbe24662ecba (diff)
downloadingen-8e39e60112ff2a86587436edbde31dc1030bb681.tar.gz
ingen-8e39e60112ff2a86587436edbde31dc1030bb681.tar.bz2
ingen-8e39e60112ff2a86587436edbde31dc1030bb681.zip
Add human name to internal nodes (fix ticket #479).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2448 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/engine/PortImpl.cpp5
-rw-r--r--src/engine/internals/Controller.cpp6
-rw-r--r--src/engine/internals/Note.cpp5
-rw-r--r--src/engine/internals/Trigger.cpp5
4 files changed, 19 insertions, 2 deletions
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index 6ee4c0e1..c7371aec 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -76,8 +76,9 @@ PortImpl::PortImpl(BufferFactory& bufs,
else
_polyphonic = true;
- add_property("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", type.uri());
- set_property("http://lv2plug.in/ns/lv2core#index", Atom((int32_t)index));
+ const LV2URIMap& uris = Shared::LV2URIMap::instance();
+ add_property(uris.rdf_type, type.uri());
+ set_property(uris.lv2_index, Atom((int32_t)index));
set_context(_context);
if (type == PortType::EVENTS)
diff --git a/src/engine/internals/Controller.cpp b/src/engine/internals/Controller.cpp
index 634fc152..3d856fe0 100644
--- a/src/engine/internals/Controller.cpp
+++ b/src/engine/internals/Controller.cpp
@@ -53,25 +53,31 @@ ControllerNode::ControllerNode(BufferFactory& bufs,
_ports = new Raul::Array<PortImpl*>(6);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom(), _buffer_size);
+ _midi_in_port->set_property(uris.lv2_name, "Input");
_ports->at(0) = _midi_in_port;
_param_port = new InputPort(bufs, this, "controller", 1, 1, PortType::CONTROL, 0.0f, sizeof(Sample));
_param_port->set_property(uris.lv2_minimum, 0.0f);
_param_port->set_property(uris.lv2_maximum, 127.0f);
_param_port->set_property(uris.lv2_integer, true);
+ _param_port->set_property(uris.lv2_name, "Controller");
_ports->at(1) = _param_port;
_log_port = new InputPort(bufs, this, "logarithmic", 2, 1, PortType::CONTROL, 0.0f, sizeof(Sample));
_log_port->set_property(uris.lv2_portProperty, uris.lv2_toggled);
+ _log_port->set_property(uris.lv2_name, "Logarithmic");
_ports->at(2) = _log_port;
_min_port = new InputPort(bufs, this, "minimum", 3, 1, PortType::CONTROL, 0.0f, sizeof(Sample));
+ _min_port->set_property(uris.lv2_name, "Minimum");
_ports->at(3) = _min_port;
_max_port = new InputPort(bufs, this, "maximum", 4, 1, PortType::CONTROL, 1.0f, sizeof(Sample));
+ _max_port->set_property(uris.lv2_name, "Maximum");
_ports->at(4) = _max_port;
_audio_port = new OutputPort(bufs, this, "ar_output", 5, 1, PortType::AUDIO, 0.0f, _buffer_size);
+ _audio_port->set_property(uris.lv2_name, "Output");
_ports->at(5) = _audio_port;
}
diff --git a/src/engine/internals/Note.cpp b/src/engine/internals/Note.cpp
index 61b7946f..a400e3c4 100644
--- a/src/engine/internals/Note.cpp
+++ b/src/engine/internals/Note.cpp
@@ -57,22 +57,27 @@ NoteNode::NoteNode(BufferFactory& bufs, const string& path, bool polyphonic, Pat
_ports = new Raul::Array<PortImpl*>(5);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom(), _buffer_size);
+ _midi_in_port->set_property(uris.lv2_name, "Input");
_ports->at(0) = _midi_in_port;
_freq_port = new OutputPort(bufs, this, "frequency", 1, _polyphony, PortType::AUDIO, 440.0f, _buffer_size);
+ _freq_port->set_property(uris.lv2_name, "Frequency");
_ports->at(1) = _freq_port;
_vel_port = new OutputPort(bufs, this, "velocity", 2, _polyphony, PortType::AUDIO, 0.0f, _buffer_size);
_vel_port->set_property(uris.lv2_minimum, 0.0f);
_vel_port->set_property(uris.lv2_maximum, 1.0f);
+ _vel_port->set_property(uris.lv2_name, "Velocity");
_ports->at(2) = _vel_port;
_gate_port = new OutputPort(bufs, this, "gate", 3, _polyphony, PortType::AUDIO, 0.0f, _buffer_size);
_gate_port->set_property(uris.lv2_portProperty, uris.lv2_toggled);
+ _gate_port->set_property(uris.lv2_name, "Gate");
_ports->at(3) = _gate_port;
_trig_port = new OutputPort(bufs, this, "trigger", 4, _polyphony, PortType::AUDIO, 0.0f, _buffer_size);
_trig_port->set_property(uris.lv2_portProperty, uris.lv2_toggled);
+ _trig_port->set_property(uris.lv2_name, "Trigger");
_ports->at(4) = _trig_port;
}
diff --git a/src/engine/internals/Trigger.cpp b/src/engine/internals/Trigger.cpp
index f6474af2..eded1ac7 100644
--- a/src/engine/internals/Trigger.cpp
+++ b/src/engine/internals/Trigger.cpp
@@ -51,25 +51,30 @@ TriggerNode::TriggerNode(BufferFactory& bufs, const string& path, bool polyphoni
_ports = new Raul::Array<PortImpl*>(5);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom(), _buffer_size);
+ _midi_in_port->set_property(uris.lv2_name, "Input");
_ports->at(0) = _midi_in_port;
_note_port = new InputPort(bufs, this, "note", 1, 1, PortType::CONTROL, 60.0f, sizeof(Sample));
_note_port->set_property(uris.lv2_minimum, 0.0f);
_note_port->set_property(uris.lv2_maximum, 127.0f);
_note_port->set_property(uris.lv2_integer, true);
+ _note_port->set_property(uris.lv2_name, "Note");
_ports->at(1) = _note_port;
_gate_port = new OutputPort(bufs, this, "gate", 2, 1, PortType::AUDIO, 0.0f, _buffer_size);
_gate_port->set_property(uris.lv2_portProperty, uris.lv2_toggled);
+ _gate_port->set_property(uris.lv2_name, "Gate");
_ports->at(2) = _gate_port;
_trig_port = new OutputPort(bufs, this, "trigger", 3, 1, PortType::AUDIO, 0.0f, _buffer_size);
_trig_port->set_property(uris.lv2_portProperty, uris.lv2_toggled);
+ _trig_port->set_property(uris.lv2_name, "Trigger");
_ports->at(3) = _trig_port;
_vel_port = new OutputPort(bufs, this, "velocity", 4, 1, PortType::AUDIO, 0.0f, _buffer_size);
_vel_port->set_property(uris.lv2_minimum, 0.0f);
_vel_port->set_property(uris.lv2_maximum, 1.0f);
+ _vel_port->set_property(uris.lv2_name, "Velocity");
_ports->at(4) = _vel_port;
}