summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/InternalPlugin.cpp8
-rw-r--r--src/libs/engine/InternalPlugin.hpp2
-rw-r--r--src/libs/engine/MidiControlNode.cpp2
-rw-r--r--src/libs/engine/MidiNoteNode.cpp2
-rw-r--r--src/libs/engine/MidiTriggerNode.cpp2
-rw-r--r--src/libs/engine/TransportNode.cpp2
-rw-r--r--src/libs/engine/events/NoteEvent.cpp9
7 files changed, 15 insertions, 12 deletions
diff --git a/src/libs/engine/InternalPlugin.cpp b/src/libs/engine/InternalPlugin.cpp
index a068123d..9141b545 100644
--- a/src/libs/engine/InternalPlugin.cpp
+++ b/src/libs/engine/InternalPlugin.cpp
@@ -49,13 +49,13 @@ InternalPlugin::instantiate(const string& name,
{
assert(_type == Internal);
- if (_uri == "ingen:note_node") {
+ if (_uri == NS_INGEN "note_node") {
return new MidiNoteNode(name, polyphonic, parent, srate, buffer_size);
- } else if (_uri == "ingen:trigger_node") {
+ } else if (_uri == NS_INGEN "trigger_node") {
return new MidiTriggerNode(name, polyphonic, parent, srate, buffer_size);
- } else if (_uri == "ingen:control_node") {
+ } else if (_uri == NS_INGEN "control_node") {
return new MidiControlNode(name, polyphonic, parent, srate, buffer_size);
- } else if (_uri == "ingen:transport_node") {
+ } else if (_uri == NS_INGEN "transport_node") {
return new TransportNode(name, polyphonic, parent, srate, buffer_size);
} else {
return NULL;
diff --git a/src/libs/engine/InternalPlugin.hpp b/src/libs/engine/InternalPlugin.hpp
index 6f1f6023..02ca3e59 100644
--- a/src/libs/engine/InternalPlugin.hpp
+++ b/src/libs/engine/InternalPlugin.hpp
@@ -34,6 +34,8 @@
#include "types.hpp"
#include "PluginImpl.hpp"
+#define NS_INGEN "http://drobilla.net/ns/ingen#"
+
namespace Ingen {
class NodeImpl;
diff --git a/src/libs/engine/MidiControlNode.cpp b/src/libs/engine/MidiControlNode.cpp
index c855f307..bfe0e57e 100644
--- a/src/libs/engine/MidiControlNode.cpp
+++ b/src/libs/engine/MidiControlNode.cpp
@@ -36,7 +36,7 @@ MidiControlNode::MidiControlNode(const string& path,
PatchImpl* parent,
SampleRate srate,
size_t buffer_size)
- : NodeBase(new InternalPlugin("ingen:control_node", "controller", "MIDI Controller")
+ : NodeBase(new InternalPlugin(NS_INGEN "control_node", "controller", "MIDI Controller")
, path, false, parent, srate, buffer_size)
, _learning(false)
{
diff --git a/src/libs/engine/MidiNoteNode.cpp b/src/libs/engine/MidiNoteNode.cpp
index e9b36fbf..0bf18f42 100644
--- a/src/libs/engine/MidiNoteNode.cpp
+++ b/src/libs/engine/MidiNoteNode.cpp
@@ -37,7 +37,7 @@ namespace Ingen {
MidiNoteNode::MidiNoteNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
- : NodeBase(new InternalPlugin("ingen:note_node", "note", "MIDI Note"),
+ : NodeBase(new InternalPlugin(NS_INGEN "note_node", "note", "MIDI Note"),
path, polyphonic, parent, srate, buffer_size)
, _voices(new Raul::Array<Voice>(_polyphony))
, _prepared_voices(NULL)
diff --git a/src/libs/engine/MidiTriggerNode.cpp b/src/libs/engine/MidiTriggerNode.cpp
index 65f9833e..aa2c272f 100644
--- a/src/libs/engine/MidiTriggerNode.cpp
+++ b/src/libs/engine/MidiTriggerNode.cpp
@@ -32,7 +32,7 @@ namespace Ingen {
MidiTriggerNode::MidiTriggerNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
- : NodeBase(new InternalPlugin("ingen:trigger_node", "trigger", "MIDI Trigger"),
+ : NodeBase(new InternalPlugin(NS_INGEN "trigger_node", "trigger", "MIDI Trigger"),
path, false, parent, srate, buffer_size)
{
_ports = new Raul::Array<PortImpl*>(5);
diff --git a/src/libs/engine/TransportNode.cpp b/src/libs/engine/TransportNode.cpp
index e65719df..3fc14a43 100644
--- a/src/libs/engine/TransportNode.cpp
+++ b/src/libs/engine/TransportNode.cpp
@@ -28,7 +28,7 @@ namespace Ingen {
TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
-: NodeBase(new InternalPlugin("ingen:transport_node", "transport", "Transport Follower"),
+: NodeBase(new InternalPlugin(NS_INGEN "transport_node", "transport", "Transport Follower"),
path, false, parent, srate, buffer_size)
{
#if 0
diff --git a/src/libs/engine/events/NoteEvent.cpp b/src/libs/engine/events/NoteEvent.cpp
index d74d5cd0..58842ae6 100644
--- a/src/libs/engine/events/NoteEvent.cpp
+++ b/src/libs/engine/events/NoteEvent.cpp
@@ -23,6 +23,7 @@
#include "MidiNoteNode.hpp"
#include "MidiTriggerNode.hpp"
#include "PluginImpl.hpp"
+#include "InternalPlugin.hpp"
#include "ProcessContext.hpp"
namespace Ingen {
@@ -71,14 +72,14 @@ NoteEvent::execute(ProcessContext& context)
if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
if (_on) {
- if (_node->plugin_impl()->uri() == "ingen:note_node")
+ if (_node->plugin_impl()->uri() == NS_INGEN "note_node")
((MidiNoteNode*)_node)->note_on(context, _note_num, _velocity, _time);
- else if (_node->plugin_impl()->uri() == "ingen:trigger_node")
+ else if (_node->plugin_impl()->uri() == NS_INGEN "trigger_node")
((MidiTriggerNode*)_node)->note_on(context, _note_num, _velocity, _time);
} else {
- if (_node->plugin_impl()->uri() == "ingen:note_node")
+ if (_node->plugin_impl()->uri() == NS_INGEN "note_node")
((MidiNoteNode*)_node)->note_off(context, _note_num, _time);
- else if (_node->plugin_impl()->uri() == "ingen:trigger_node")
+ else if (_node->plugin_impl()->uri() == NS_INGEN "trigger_node")
((MidiTriggerNode*)_node)->note_off(context, _note_num, _time);
}
}