summaryrefslogtreecommitdiffstats
path: root/src/server/internals
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-18 18:46:53 +0000
committerDavid Robillard <d@drobilla.net>2012-11-18 18:46:53 +0000
commitd358cae57b7233bf6b781686979fc4dea4d090b3 (patch)
treee60f45f73892fd62fea6caef507567c57722b5b9 /src/server/internals
parentc8745c6975c6173d08957c4a16bf8b95831ec05a (diff)
downloadingen-d358cae57b7233bf6b781686979fc4dea4d090b3.tar.gz
ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.tar.bz2
ingen-d358cae57b7233bf6b781686979fc4dea4d090b3.zip
Fix learn for Trigger and Internal nodes.
Set value property for inputs when a notification is sent so model is consistent (and learned values are saved correctly). Don't redundantly store value atom in PortModel, just use property directly. Fix incorrect use of lv2:integer as a predicate. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4835 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/internals')
-rw-r--r--src/server/internals/Controller.cpp2
-rw-r--r--src/server/internals/Trigger.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index f38545d3..e65319a0 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -62,7 +62,7 @@ ControllerNode::ControllerNode(InternalPlugin* plugin,
PortType::CONTROL, 0, bufs.forge().make(0.0f));
_param_port->set_property(uris.lv2_minimum, bufs.forge().make(0.0f));
_param_port->set_property(uris.lv2_maximum, bufs.forge().make(127.0f));
- _param_port->set_property(uris.lv2_integer, bufs.forge().make(true));
+ _param_port->set_property(uris.lv2_portProperty, uris.lv2_integer);
_param_port->set_property(uris.lv2_name, bufs.forge().alloc("Controller"));
_ports->at(1) = _param_port;
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index cdc09a98..41e1800f 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -62,7 +62,7 @@ TriggerNode::TriggerNode(InternalPlugin* plugin,
PortType::CONTROL, 0, bufs.forge().make(60.0f));
_note_port->set_property(uris.lv2_minimum, bufs.forge().make(0.0f));
_note_port->set_property(uris.lv2_maximum, bufs.forge().make(127.0f));
- _note_port->set_property(uris.lv2_integer, bufs.forge().make(true));
+ _note_port->set_property(uris.lv2_portProperty, uris.lv2_integer);
_note_port->set_property(uris.lv2_name, bufs.forge().alloc("Note"));
_ports->at(1) = _note_port;
@@ -131,8 +131,8 @@ TriggerNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity
if (_learning) {
// FIXME: not thread safe
- _note_port->set_value(context.engine().world()->forge().make(note_num));
- _note_port->set_control_value(context, time, note_num);
+ _note_port->set_value(context.engine().world()->forge().make((float)note_num));
+ _note_port->set_control_value(context, time, (float)note_num);
_note_port->broadcast_value(context, true);
_learning = false;
}