summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-28 23:51:25 +0000
committerDavid Robillard <d@drobilla.net>2008-11-28 23:51:25 +0000
commit6b04f4fd3a84457eed53132ac42b6b8f44b289d6 (patch)
treee0844ab77b732f437a1100faf462d27fe86b7966 /src/engine
parent41f370378810f4d1d3b03db1730edbe21bb44397 (diff)
downloadingen-6b04f4fd3a84457eed53132ac42b6b8f44b289d6.tar.gz
ingen-6b04f4fd3a84457eed53132ac42b6b8f44b289d6.tar.bz2
ingen-6b04f4fd3a84457eed53132ac42b6b8f44b289d6.zip
Sane ontology for internaals.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1818 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/InternalPlugin.cpp8
-rw-r--r--src/engine/InternalPlugin.hpp1
-rw-r--r--src/engine/MidiControlNode.cpp4
-rw-r--r--src/engine/MidiNoteNode.cpp4
-rw-r--r--src/engine/MidiTriggerNode.cpp4
-rw-r--r--src/engine/TransportNode.cpp4
-rw-r--r--src/engine/events/NoteEvent.cpp10
7 files changed, 18 insertions, 17 deletions
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index 2e869395..6d070037 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -38,13 +38,13 @@ InternalPlugin::instantiate(const string& name,
SampleCount srate = engine.audio_driver()->sample_rate();
SampleCount buffer_size = engine.audio_driver()->buffer_size();
- if (uri() == NS_INGEN "note_node") {
+ if (uri() == NS_INTERNALS "Note") {
return new MidiNoteNode(name, polyphonic, parent, srate, buffer_size);
- } else if (uri() == NS_INGEN "trigger_node") {
+ } else if (uri() == NS_INTERNALS "Trigger") {
return new MidiTriggerNode(name, polyphonic, parent, srate, buffer_size);
- } else if (uri() == NS_INGEN "control_node") {
+ } else if (uri() == NS_INTERNALS "Controller") {
return new MidiControlNode(name, polyphonic, parent, srate, buffer_size);
- } else if (uri() == NS_INGEN "transport_node") {
+ } else if (uri() == NS_INTERNALS "Transport") {
return new TransportNode(name, polyphonic, parent, srate, buffer_size);
} else {
return NULL;
diff --git a/src/engine/InternalPlugin.hpp b/src/engine/InternalPlugin.hpp
index 3b285a0a..e93f7b9b 100644
--- a/src/engine/InternalPlugin.hpp
+++ b/src/engine/InternalPlugin.hpp
@@ -35,6 +35,7 @@
#include "PluginImpl.hpp"
#define NS_INGEN "http://drobilla.net/ns/ingen#"
+#define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#"
namespace Ingen {
diff --git a/src/engine/MidiControlNode.cpp b/src/engine/MidiControlNode.cpp
index feae6799..e8237ba3 100644
--- a/src/engine/MidiControlNode.cpp
+++ b/src/engine/MidiControlNode.cpp
@@ -32,14 +32,14 @@
namespace Ingen {
+static InternalPlugin controller_plugin(NS_INTERNALS "Controller", "controller", "Controller");
MidiControlNode::MidiControlNode(const string& path,
bool polyphonic,
PatchImpl* parent,
SampleRate srate,
size_t buffer_size)
- : NodeBase(new InternalPlugin(NS_INGEN "control_node", "controller", "Controller")
- , path, false, parent, srate, buffer_size)
+ : NodeBase(&controller_plugin, path, false, parent, srate, buffer_size)
, _learning(false)
{
_ports = new Raul::Array<PortImpl*>(6);
diff --git a/src/engine/MidiNoteNode.cpp b/src/engine/MidiNoteNode.cpp
index 7918e1d2..53f0a0b0 100644
--- a/src/engine/MidiNoteNode.cpp
+++ b/src/engine/MidiNoteNode.cpp
@@ -35,10 +35,10 @@ using namespace std;
namespace Ingen {
+static InternalPlugin note_plugin(NS_INTERNALS "Note", "note", "Note");
MidiNoteNode::MidiNoteNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
- : NodeBase(new InternalPlugin(NS_INGEN "note_node", "note", "Note"),
- path, polyphonic, parent, srate, buffer_size)
+ : NodeBase(&note_plugin, path, polyphonic, parent, srate, buffer_size)
, _voices(new Raul::Array<Voice>(_polyphony))
, _prepared_voices(NULL)
, _sustain(false)
diff --git a/src/engine/MidiTriggerNode.cpp b/src/engine/MidiTriggerNode.cpp
index 0212154a..3cde19e7 100644
--- a/src/engine/MidiTriggerNode.cpp
+++ b/src/engine/MidiTriggerNode.cpp
@@ -30,10 +30,10 @@ using namespace std;
namespace Ingen {
+static InternalPlugin trigger_plugin(NS_INTERNALS "Trigger", "trigger", "Trigger");
MidiTriggerNode::MidiTriggerNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
- : NodeBase(new InternalPlugin(NS_INGEN "trigger_node", "trigger", "Trigger"),
- path, false, parent, srate, buffer_size)
+ : NodeBase(&trigger_plugin, path, false, parent, srate, buffer_size)
, _learning(false)
{
_ports = new Raul::Array<PortImpl*>(5);
diff --git a/src/engine/TransportNode.cpp b/src/engine/TransportNode.cpp
index 3fc14a43..746c6042 100644
--- a/src/engine/TransportNode.cpp
+++ b/src/engine/TransportNode.cpp
@@ -26,10 +26,10 @@
namespace Ingen {
+static InternalPlugin transport_plugin(NS_INTERNALS "Transport", "transport", "Transport");
TransportNode::TransportNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
-: NodeBase(new InternalPlugin(NS_INGEN "transport_node", "transport", "Transport Follower"),
- path, false, parent, srate, buffer_size)
+ : NodeBase(&transport_plugin, path, false, parent, srate, buffer_size)
{
#if 0
_num_ports = 10;
diff --git a/src/engine/events/NoteEvent.cpp b/src/engine/events/NoteEvent.cpp
index 58842ae6..bc44ae1f 100644
--- a/src/engine/events/NoteEvent.cpp
+++ b/src/engine/events/NoteEvent.cpp
@@ -72,14 +72,14 @@ NoteEvent::execute(ProcessContext& context)
if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
if (_on) {
- if (_node->plugin_impl()->uri() == NS_INGEN "note_node")
+ if (_node->plugin_impl()->uri() == NS_INTERNALS "Note")
((MidiNoteNode*)_node)->note_on(context, _note_num, _velocity, _time);
- else if (_node->plugin_impl()->uri() == NS_INGEN "trigger_node")
+ else if (_node->plugin_impl()->uri() == NS_INTERNALS "Trigger")
((MidiTriggerNode*)_node)->note_on(context, _note_num, _velocity, _time);
} else {
- if (_node->plugin_impl()->uri() == NS_INGEN "note_node")
+ if (_node->plugin_impl()->uri() == NS_INTERNALS "Note")
((MidiNoteNode*)_node)->note_off(context, _note_num, _time);
- else if (_node->plugin_impl()->uri() == NS_INGEN "trigger_node")
+ else if (_node->plugin_impl()->uri() == NS_INTERNALS "Trigger")
((MidiTriggerNode*)_node)->note_off(context, _note_num, _time);
}
}
@@ -93,7 +93,7 @@ NoteEvent::post_process()
if (_node)
_responder->respond_ok();
else
- _responder->respond_error("Did not find node for note_on");
+ _responder->respond_error("Did not find node for note on event");
}
}