summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-29 00:15:14 +0000
committerDavid Robillard <d@drobilla.net>2008-11-29 00:15:14 +0000
commit4c6f391dc7263521e9607123d7aca35d8257e61e (patch)
treebd0a204a80253c26269dff505278dac78bcffc26
parent0674d8cf8a96210eb692176864d92dc2806f6457 (diff)
downloadingen-4c6f391dc7263521e9607123d7aca35d8257e61e.tar.gz
ingen-4c6f391dc7263521e9607123d7aca35d8257e61e.tar.bz2
ingen-4c6f391dc7263521e9607123d7aca35d8257e61e.zip
Set properties (not variables) on internal nodes so serialisations match LV2 plugin style.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1820 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/engine/InternalController.cpp8
-rw-r--r--src/engine/InternalNote.cpp8
-rw-r--r--src/engine/InternalTrigger.cpp10
3 files changed, 15 insertions, 11 deletions
diff --git a/src/engine/InternalController.cpp b/src/engine/InternalController.cpp
index 25c4570c..8e378f50 100644
--- a/src/engine/InternalController.cpp
+++ b/src/engine/InternalController.cpp
@@ -48,13 +48,13 @@ ControllerNode::ControllerNode(const string& path,
_ports->at(0) = _midi_in_port;
_param_port = new InputPort(this, "controller", 1, 1, DataType::CONTROL, 0.0f, 1);
- _param_port->set_variable("lv2:minimum", 0.0f);
- _param_port->set_variable("lv2:maximum", 127.0f);
- _param_port->set_variable("lv2:integer", true);
+ _param_port->set_property("lv2:minimum", 0.0f);
+ _param_port->set_property("lv2:maximum", 127.0f);
+ _param_port->set_property("lv2:integer", true);
_ports->at(1) = _param_port;
_log_port = new InputPort(this, "logarithmic", 2, 1, DataType::CONTROL, 0.0f, 1);
- _log_port->set_variable("lv2:toggled", true);
+ _log_port->set_property("lv2:toggled", true);
_ports->at(2) = _log_port;
_min_port = new InputPort(this, "minimum", 3, 1, DataType::CONTROL, 0.0f, 1);
diff --git a/src/engine/InternalNote.cpp b/src/engine/InternalNote.cpp
index dba2fbc2..7bb9c4aa 100644
--- a/src/engine/InternalNote.cpp
+++ b/src/engine/InternalNote.cpp
@@ -52,16 +52,16 @@ NoteNode::NoteNode(const string& path, bool polyphonic, PatchImpl* parent, Sampl
_ports->at(1) = _freq_port;
_vel_port = new OutputPort(this, "velocity", 2, _polyphony, DataType::AUDIO, 0.0f, _buffer_size);
- _vel_port->set_variable("lv2:minimum", 0.0f);
- _vel_port->set_variable("lv2:maximum", 1.0f);
+ _vel_port->set_property("lv2:minimum", 0.0f);
+ _vel_port->set_property("lv2:maximum", 1.0f);
_ports->at(2) = _vel_port;
_gate_port = new OutputPort(this, "gate", 3, _polyphony, DataType::AUDIO, 0.0f, _buffer_size);
- _gate_port->set_variable("lv2:toggled", true);
+ _gate_port->set_property("lv2:toggled", true);
_ports->at(3) = _gate_port;
_trig_port = new OutputPort(this, "trigger", 4, _polyphony, DataType::AUDIO, 0.0f, _buffer_size);
- _trig_port->set_variable("lv2:toggled", true);
+ _trig_port->set_property("lv2:toggled", true);
_ports->at(4) = _trig_port;
}
diff --git a/src/engine/InternalTrigger.cpp b/src/engine/InternalTrigger.cpp
index d76d6910..a4cc3609 100644
--- a/src/engine/InternalTrigger.cpp
+++ b/src/engine/InternalTrigger.cpp
@@ -42,18 +42,22 @@ TriggerNode::TriggerNode(const string& path, bool polyphonic, PatchImpl* parent,
_ports->at(0) = _midi_in_port;
_note_port = new InputPort(this, "note", 1, 1, DataType::CONTROL, 60.0f, 1);
- _note_port->set_variable("lv2:minimum", 0.0f);
- _note_port->set_variable("lv2:maximum", 127.0f);
- _note_port->set_variable("lv2:integer", true);
+ _note_port->set_property("lv2:minimum", 0.0f);
+ _note_port->set_property("lv2:maximum", 127.0f);
+ _note_port->set_property("lv2:integer", true);
_ports->at(1) = _note_port;
_gate_port = new OutputPort(this, "gate", 2, 1, DataType::AUDIO, 0.0f, _buffer_size);
+ _gate_port->set_property("lv2:toggled", true);
_ports->at(2) = _gate_port;
_trig_port = new OutputPort(this, "trigger", 3, 1, DataType::AUDIO, 0.0f, _buffer_size);
+ _trig_port->set_property("lv2:toggled", true);
_ports->at(3) = _trig_port;
_vel_port = new OutputPort(this, "velocity", 4, 1, DataType::AUDIO, 0.0f, _buffer_size);
+ _vel_port->set_property("lv2:minimum", 0.0f);
+ _vel_port->set_property("lv2:maximum", 1.0f);
_ports->at(4) = _vel_port;
}