diff options
Diffstat (limited to 'src/engine/internals/Trigger.cpp')
-rw-r--r-- | src/engine/internals/Trigger.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/engine/internals/Trigger.cpp b/src/engine/internals/Trigger.cpp index 440e9a63..68d938c0 100644 --- a/src/engine/internals/Trigger.cpp +++ b/src/engine/internals/Trigger.cpp @@ -18,6 +18,7 @@ #include <cmath> #include "raul/log.hpp" #include "raul/midi_events.h" +#include "shared/LV2URIMap.hpp" #include "internals/Trigger.hpp" #include "AudioBuffer.hpp" #include "EventBuffer.hpp" @@ -44,28 +45,29 @@ TriggerNode::TriggerNode(BufferFactory& bufs, const string& path, bool polyphoni : NodeBase(&trigger_plugin, path, false, parent, srate, buffer_size) , _learning(false) { + const LV2URIMap& uris = LV2URIMap::instance(); _ports = new Raul::Array<PortImpl*>(5); _midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom(), _buffer_size); _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("lv2:minimum", 0.0f); - _note_port->set_property("lv2:maximum", 127.0f); - _note_port->set_property("lv2:integer", true); + _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); _ports->at(1) = _note_port; _gate_port = new OutputPort(bufs, this, "gate", 2, 1, PortType::AUDIO, 0.0f, _buffer_size); - _gate_port->set_property("lv2:toggled", true); + _gate_port->set_property(uris.lv2_toggled, true); _ports->at(2) = _gate_port; _trig_port = new OutputPort(bufs, this, "trigger", 3, 1, PortType::AUDIO, 0.0f, _buffer_size); - _trig_port->set_property("lv2:toggled", true); + _trig_port->set_property(uris.lv2_toggled, true); _ports->at(3) = _trig_port; _vel_port = new OutputPort(bufs, this, "velocity", 4, 1, PortType::AUDIO, 0.0f, _buffer_size); - _vel_port->set_property("lv2:minimum", 0.0f); - _vel_port->set_property("lv2:maximum", 1.0f); + _vel_port->set_property(uris.lv2_minimum, 0.0f); + _vel_port->set_property(uris.lv2_maximum, 1.0f); _ports->at(4) = _vel_port; } |