summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/InternalController.cpp (renamed from src/engine/MidiControlNode.cpp)16
-rw-r--r--src/engine/InternalController.hpp (renamed from src/engine/MidiControlNode.hpp)4
-rw-r--r--src/engine/InternalNote.cpp (renamed from src/engine/MidiNoteNode.cpp)36
-rw-r--r--src/engine/InternalNote.hpp (renamed from src/engine/MidiNoteNode.hpp)6
-rw-r--r--src/engine/InternalPlugin.cpp14
-rw-r--r--src/engine/InternalTransport.cpp (renamed from src/engine/TransportNode.cpp)2
-rw-r--r--src/engine/InternalTransport.hpp (renamed from src/engine/TransportNode.hpp)0
-rw-r--r--src/engine/InternalTrigger.cpp (renamed from src/engine/MidiTriggerNode.cpp)12
-rw-r--r--src/engine/InternalTrigger.hpp (renamed from src/engine/MidiTriggerNode.hpp)4
-rw-r--r--src/engine/NodeFactory.cpp14
-rw-r--r--src/engine/PluginImpl.cpp8
-rw-r--r--src/engine/events/MidiLearnEvent.cpp2
-rw-r--r--src/engine/events/MidiLearnEvent.hpp2
-rw-r--r--src/engine/events/NoteEvent.cpp12
-rw-r--r--src/engine/wscript10
15 files changed, 71 insertions, 71 deletions
diff --git a/src/engine/MidiControlNode.cpp b/src/engine/InternalController.cpp
index e8237ba3..25c4570c 100644
--- a/src/engine/MidiControlNode.cpp
+++ b/src/engine/InternalController.cpp
@@ -17,7 +17,7 @@
#include <math.h>
#include "raul/midi_events.h"
-#include "MidiControlNode.hpp"
+#include "InternalController.hpp"
#include "PostProcessor.hpp"
#include "events/MidiLearnEvent.hpp"
#include "events/SendPortValueEvent.hpp"
@@ -34,11 +34,11 @@ 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)
+ControllerNode::ControllerNode(const string& path,
+ bool polyphonic,
+ PatchImpl* parent,
+ SampleRate srate,
+ size_t buffer_size)
: NodeBase(&controller_plugin, path, false, parent, srate, buffer_size)
, _learning(false)
{
@@ -69,7 +69,7 @@ MidiControlNode::MidiControlNode(const string& path,
void
-MidiControlNode::process(ProcessContext& context)
+ControllerNode::process(ProcessContext& context)
{
NodeBase::pre_process(context);
@@ -95,7 +95,7 @@ MidiControlNode::process(ProcessContext& context)
void
-MidiControlNode::control(ProcessContext& context, uchar control_num, uchar val, FrameTime time)
+ControllerNode::control(ProcessContext& context, uchar control_num, uchar val, FrameTime time)
{
assert(time - context.start() < _buffer_size);
diff --git a/src/engine/MidiControlNode.hpp b/src/engine/InternalController.hpp
index 27319a7f..a861decc 100644
--- a/src/engine/MidiControlNode.hpp
+++ b/src/engine/InternalController.hpp
@@ -34,10 +34,10 @@ class OutputPort;
*
* \ingroup engine
*/
-class MidiControlNode : public NodeBase
+class ControllerNode : public NodeBase
{
public:
- MidiControlNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
+ ControllerNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
void process(ProcessContext& context);
diff --git a/src/engine/MidiNoteNode.cpp b/src/engine/InternalNote.cpp
index 53f0a0b0..dba2fbc2 100644
--- a/src/engine/MidiNoteNode.cpp
+++ b/src/engine/InternalNote.cpp
@@ -25,7 +25,7 @@
#include "InputPort.hpp"
#include "InternalPlugin.hpp"
#include "EventBuffer.hpp"
-#include "MidiNoteNode.hpp"
+#include "InternalNote.hpp"
#include "OutputPort.hpp"
#include "PatchImpl.hpp"
#include "ProcessContext.hpp"
@@ -37,7 +37,7 @@ 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)
+NoteNode::NoteNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
: NodeBase(&note_plugin, path, polyphonic, parent, srate, buffer_size)
, _voices(new Raul::Array<Voice>(_polyphony))
, _prepared_voices(NULL)
@@ -66,14 +66,14 @@ MidiNoteNode::MidiNoteNode(const string& path, bool polyphonic, PatchImpl* paren
}
-MidiNoteNode::~MidiNoteNode()
+NoteNode::~NoteNode()
{
delete _voices;
}
bool
-MidiNoteNode::prepare_poly(uint32_t poly)
+NoteNode::prepare_poly(uint32_t poly)
{
if (!_polyphonic)
return true;
@@ -90,7 +90,7 @@ MidiNoteNode::prepare_poly(uint32_t poly)
bool
-MidiNoteNode::apply_poly(Raul::Maid& maid, uint32_t poly)
+NoteNode::apply_poly(Raul::Maid& maid, uint32_t poly)
{
if (!_polyphonic)
return true;
@@ -112,7 +112,7 @@ MidiNoteNode::apply_poly(Raul::Maid& maid, uint32_t poly)
void
-MidiNoteNode::process(ProcessContext& context)
+NoteNode::process(ProcessContext& context)
{
NodeBase::pre_process(context);
@@ -185,7 +185,7 @@ MidiNoteNode::process(ProcessContext& context)
void
-MidiNoteNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, FrameTime time)
+NoteNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
@@ -196,7 +196,7 @@ MidiNoteNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, F
uint32_t voice_num = 0;
if (key->state != Key::OFF) {
- //cerr << "[MidiNoteNode] Double midi note received" << endl;
+ //cerr << "[NoteNode] Double midi note received" << endl;
return;
}
@@ -225,7 +225,7 @@ MidiNoteNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, F
assert(voice != NULL);
assert(voice == &(*_voices)[voice_num]);
- /*cerr << "[MidiNoteNode] Note " << (int)note_num << " on @ " << time
+ /*cerr << "[NoteNode] Note " << (int)note_num << " on @ " << time
<< ". Voice " << voice_num << " / " << _polyphony << endl;*/
// Update stolen key, if applicable
@@ -233,7 +233,7 @@ MidiNoteNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, F
assert(_keys[voice->note].state == Key::ON_ASSIGNED);
assert(_keys[voice->note].voice == voice_num);
_keys[voice->note].state = Key::Key::ON_UNASSIGNED;
- //cerr << "[MidiNoteNode] Stole voice " << voice_num << endl;
+ //cerr << "[NoteNode] Stole voice " << voice_num << endl;
}
// Store key information for later reallocation on note off
@@ -265,14 +265,14 @@ MidiNoteNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, F
void
-MidiNoteNode::note_off(ProcessContext& context, uchar note_num, FrameTime time)
+NoteNode::note_off(ProcessContext& context, uchar note_num, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
Key* key = &_keys[note_num];
- //cerr << "[MidiNoteNode] Note " << (int)note_num << " off @ " << time << endl;
+ //cerr << "[NoteNode] Note " << (int)note_num << " off @ " << time << endl;
if (key->state == Key::ON_ASSIGNED) {
// Assigned key, turn off voice and key
@@ -299,7 +299,7 @@ MidiNoteNode::note_off(ProcessContext& context, uchar note_num, FrameTime time)
void
-MidiNoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time)
+NoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
@@ -331,7 +331,7 @@ MidiNoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time
(*_voices)[voice].state = Voice::ACTIVE;
} else {
// No new note for voice, deactivate (set gate low)
- //cerr << "[MidiNoteNode] Note off. Key " << (int)note_num << ", Voice " << voice << " Killed" << endl;
+ //cerr << "[NoteNode] Note off. Key " << (int)note_num << ", Voice " << voice << " Killed" << endl;
((AudioBuffer*)_gate_port->buffer(voice))->set_value(0.0f, context.start(), time);
(*_voices)[voice].state = Voice::FREE;
}
@@ -339,7 +339,7 @@ MidiNoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time
void
-MidiNoteNode::all_notes_off(ProcessContext& context, FrameTime time)
+NoteNode::all_notes_off(ProcessContext& context, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
@@ -356,7 +356,7 @@ MidiNoteNode::all_notes_off(ProcessContext& context, FrameTime time)
float
-MidiNoteNode::note_to_freq(int num)
+NoteNode::note_to_freq(int num)
{
static const float A4 = 440.0f;
if (num >= 0 && num <= 119)
@@ -366,14 +366,14 @@ MidiNoteNode::note_to_freq(int num)
void
-MidiNoteNode::sustain_on(ProcessContext& context, FrameTime time)
+NoteNode::sustain_on(ProcessContext& context, FrameTime time)
{
_sustain = true;
}
void
-MidiNoteNode::sustain_off(ProcessContext& context, FrameTime time)
+NoteNode::sustain_off(ProcessContext& context, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
diff --git a/src/engine/MidiNoteNode.hpp b/src/engine/InternalNote.hpp
index eebcbda6..a6aa2807 100644
--- a/src/engine/MidiNoteNode.hpp
+++ b/src/engine/InternalNote.hpp
@@ -34,11 +34,11 @@ class OutputPort;
*
* \ingroup engine
*/
-class MidiNoteNode : public NodeBase
+class NoteNode : public NodeBase
{
public:
- MidiNoteNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
- ~MidiNoteNode();
+ NoteNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
+ ~NoteNode();
bool prepare_poly(uint32_t poly);
bool apply_poly(Raul::Maid& maid, uint32_t poly);
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index 6d070037..9f146068 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -17,10 +17,10 @@
#include <cassert>
#include "InternalPlugin.hpp"
-#include "MidiNoteNode.hpp"
-#include "MidiTriggerNode.hpp"
-#include "MidiControlNode.hpp"
-#include "TransportNode.hpp"
+#include "InternalNote.hpp"
+#include "InternalTrigger.hpp"
+#include "InternalController.hpp"
+#include "InternalTransport.hpp"
#include "Engine.hpp"
#include "AudioDriver.hpp"
@@ -39,11 +39,11 @@ InternalPlugin::instantiate(const string& name,
SampleCount buffer_size = engine.audio_driver()->buffer_size();
if (uri() == NS_INTERNALS "Note") {
- return new MidiNoteNode(name, polyphonic, parent, srate, buffer_size);
+ return new NoteNode(name, polyphonic, parent, srate, buffer_size);
} else if (uri() == NS_INTERNALS "Trigger") {
- return new MidiTriggerNode(name, polyphonic, parent, srate, buffer_size);
+ return new TriggerNode(name, polyphonic, parent, srate, buffer_size);
} else if (uri() == NS_INTERNALS "Controller") {
- return new MidiControlNode(name, polyphonic, parent, srate, buffer_size);
+ return new ControllerNode(name, polyphonic, parent, srate, buffer_size);
} else if (uri() == NS_INTERNALS "Transport") {
return new TransportNode(name, polyphonic, parent, srate, buffer_size);
} else {
diff --git a/src/engine/TransportNode.cpp b/src/engine/InternalTransport.cpp
index 746c6042..90b8db28 100644
--- a/src/engine/TransportNode.cpp
+++ b/src/engine/InternalTransport.cpp
@@ -15,7 +15,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "TransportNode.hpp"
+#include "InternalTransport.hpp"
#include <jack/transport.h>
#include "OutputPort.hpp"
#include "InternalPlugin.hpp"
diff --git a/src/engine/TransportNode.hpp b/src/engine/InternalTransport.hpp
index af0ed207..af0ed207 100644
--- a/src/engine/TransportNode.hpp
+++ b/src/engine/InternalTransport.hpp
diff --git a/src/engine/MidiTriggerNode.cpp b/src/engine/InternalTrigger.cpp
index 3cde19e7..d76d6910 100644
--- a/src/engine/MidiTriggerNode.cpp
+++ b/src/engine/InternalTrigger.cpp
@@ -17,7 +17,7 @@
#include <cmath>
#include "raul/midi_events.h"
-#include "MidiTriggerNode.hpp"
+#include "InternalTrigger.hpp"
#include "AudioBuffer.hpp"
#include "InputPort.hpp"
#include "OutputPort.hpp"
@@ -32,7 +32,7 @@ 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)
+TriggerNode::TriggerNode(const string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size)
: NodeBase(&trigger_plugin, path, false, parent, srate, buffer_size)
, _learning(false)
{
@@ -59,7 +59,7 @@ MidiTriggerNode::MidiTriggerNode(const string& path, bool polyphonic, PatchImpl*
void
-MidiTriggerNode::process(ProcessContext& context)
+TriggerNode::process(ProcessContext& context)
{
NodeBase::pre_process(context);
@@ -103,7 +103,7 @@ MidiTriggerNode::process(ProcessContext& context)
void
-MidiTriggerNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, FrameTime time)
+TriggerNode::note_on(ProcessContext& context, uchar note_num, uchar velocity, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
@@ -116,7 +116,7 @@ MidiTriggerNode::note_on(ProcessContext& context, uchar note_num, uchar velocity
_learning = false;
}
- /*cerr << "[MidiTriggerNode] " << path() << " Note " << (int)note_num << " on @ " << time << endl;*/
+ /*cerr << "[TriggerNode] " << path() << " Note " << (int)note_num << " on @ " << time << endl;*/
Sample filter_note = ((AudioBuffer*)_note_port->buffer(0))->value_at(0);
if (filter_note >= 0.0 && filter_note < 127.0 && (note_num == (uchar)filter_note)) {
@@ -130,7 +130,7 @@ MidiTriggerNode::note_on(ProcessContext& context, uchar note_num, uchar velocity
void
-MidiTriggerNode::note_off(ProcessContext& context, uchar note_num, FrameTime time)
+TriggerNode::note_off(ProcessContext& context, uchar note_num, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
assert(time - context.start() < _buffer_size);
diff --git a/src/engine/MidiTriggerNode.hpp b/src/engine/InternalTrigger.hpp
index 413b8102..8040a157 100644
--- a/src/engine/MidiTriggerNode.hpp
+++ b/src/engine/InternalTrigger.hpp
@@ -37,10 +37,10 @@ class OutputPort;
*
* \ingroup engine
*/
-class MidiTriggerNode : public NodeBase
+class TriggerNode : public NodeBase
{
public:
- MidiTriggerNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
+ TriggerNode(const std::string& path, bool polyphonic, PatchImpl* parent, SampleRate srate, size_t buffer_size);
void process(ProcessContext& context);
diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp
index 0d15907b..7e5375c2 100644
--- a/src/engine/NodeFactory.cpp
+++ b/src/engine/NodeFactory.cpp
@@ -25,10 +25,10 @@
#include "module/World.hpp"
#include "NodeFactory.hpp"
#include "ThreadManager.hpp"
-#include "MidiNoteNode.hpp"
-#include "MidiTriggerNode.hpp"
-#include "MidiControlNode.hpp"
-#include "TransportNode.hpp"
+#include "InternalNote.hpp"
+#include "InternalTrigger.hpp"
+#include "InternalController.hpp"
+#include "InternalTransport.hpp"
#include "PatchImpl.hpp"
#include "InternalPlugin.hpp"
#ifdef HAVE_LADSPA
@@ -139,13 +139,13 @@ NodeFactory::load_internal_plugins()
PatchImpl* parent = new PatchImpl(*_world->local_engine, "dummy", 1, NULL, 1, 1, 1);
NodeImpl* n = NULL;
- n = new MidiNoteNode("foo", 1, parent, 1, 1);
+ n = new NoteNode("foo", 1, parent, 1, 1);
_plugins.insert(make_pair(n->plugin_impl()->uri(), n->plugin_impl()));
delete n;
- n = new MidiTriggerNode("foo", 1, parent, 1, 1);
+ n = new TriggerNode("foo", 1, parent, 1, 1);
_plugins.insert(make_pair(n->plugin_impl()->uri(), n->plugin_impl()));
delete n;
- n = new MidiControlNode("foo", 1, parent, 1, 1);
+ n = new ControllerNode("foo", 1, parent, 1, 1);
_plugins.insert(make_pair(n->plugin_impl()->uri(), n->plugin_impl()));
delete n;
n = new TransportNode("foo", 1, parent, 1, 1);
diff --git a/src/engine/PluginImpl.cpp b/src/engine/PluginImpl.cpp
index 215cf4ce..7370defc 100644
--- a/src/engine/PluginImpl.cpp
+++ b/src/engine/PluginImpl.cpp
@@ -17,10 +17,10 @@
#include <iostream>
#include "PluginImpl.hpp"
-#include "MidiNoteNode.hpp"
-#include "MidiTriggerNode.hpp"
-#include "MidiControlNode.hpp"
-#include "TransportNode.hpp"
+#include "InternalNote.hpp"
+#include "InternalTrigger.hpp"
+#include "InternalController.hpp"
+#include "InternalTransport.hpp"
using namespace std;
diff --git a/src/engine/events/MidiLearnEvent.cpp b/src/engine/events/MidiLearnEvent.cpp
index 8c2439a2..5bcbe1d2 100644
--- a/src/engine/events/MidiLearnEvent.cpp
+++ b/src/engine/events/MidiLearnEvent.cpp
@@ -20,7 +20,7 @@
#include "Engine.hpp"
#include "EngineStore.hpp"
#include "NodeImpl.hpp"
-#include "MidiControlNode.hpp"
+#include "InternalController.hpp"
#include "ClientBroadcaster.hpp"
#include "PluginImpl.hpp"
diff --git a/src/engine/events/MidiLearnEvent.hpp b/src/engine/events/MidiLearnEvent.hpp
index fca96307..667ff06c 100644
--- a/src/engine/events/MidiLearnEvent.hpp
+++ b/src/engine/events/MidiLearnEvent.hpp
@@ -19,7 +19,7 @@
#define MIDILEARNEVENT_H
#include "QueuedEvent.hpp"
-#include "MidiControlNode.hpp"
+#include "InternalController.hpp"
#include "types.hpp"
#include <string>
diff --git a/src/engine/events/NoteEvent.cpp b/src/engine/events/NoteEvent.cpp
index bc44ae1f..a53f5218 100644
--- a/src/engine/events/NoteEvent.cpp
+++ b/src/engine/events/NoteEvent.cpp
@@ -20,8 +20,8 @@
#include "Engine.hpp"
#include "EngineStore.hpp"
#include "NodeImpl.hpp"
-#include "MidiNoteNode.hpp"
-#include "MidiTriggerNode.hpp"
+#include "InternalNote.hpp"
+#include "InternalTrigger.hpp"
#include "PluginImpl.hpp"
#include "InternalPlugin.hpp"
#include "ProcessContext.hpp"
@@ -73,14 +73,14 @@ NoteEvent::execute(ProcessContext& context)
if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
if (_on) {
if (_node->plugin_impl()->uri() == NS_INTERNALS "Note")
- ((MidiNoteNode*)_node)->note_on(context, _note_num, _velocity, _time);
+ ((NoteNode*)_node)->note_on(context, _note_num, _velocity, _time);
else if (_node->plugin_impl()->uri() == NS_INTERNALS "Trigger")
- ((MidiTriggerNode*)_node)->note_on(context, _note_num, _velocity, _time);
+ ((TriggerNode*)_node)->note_on(context, _note_num, _velocity, _time);
} else {
if (_node->plugin_impl()->uri() == NS_INTERNALS "Note")
- ((MidiNoteNode*)_node)->note_off(context, _note_num, _time);
+ ((NoteNode*)_node)->note_off(context, _note_num, _time);
else if (_node->plugin_impl()->uri() == NS_INTERNALS "Trigger")
- ((MidiTriggerNode*)_node)->note_off(context, _note_num, _time);
+ ((TriggerNode*)_node)->note_off(context, _note_num, _time);
}
}
}
diff --git a/src/engine/wscript b/src/engine/wscript
index 6e0cac91..01b63e84 100644
--- a/src/engine/wscript
+++ b/src/engine/wscript
@@ -16,11 +16,12 @@ def build(bld):
EventSink.cpp
GraphObjectImpl.cpp
InputPort.cpp
+ InternalController.cpp
+ InternalNote.cpp
InternalPlugin.cpp
+ InternalTransport.cpp
+ InternalTrigger.cpp
MessageContext.cpp
- MidiControlNode.cpp
- MidiNoteNode.cpp
- MidiTriggerNode.cpp
NodeBase.cpp
NodeFactory.cpp
ObjectSender.cpp
@@ -31,10 +32,9 @@ def build(bld):
PostProcessor.cpp
ProcessSlave.cpp
QueuedEvent.cpp
- TransportNode.cpp
- ingen_engine.cpp
events/SendPortActivityEvent.cpp
events/SendPortValueEvent.cpp
+ ingen_engine.cpp
'''
obj = bld.create_obj('cpp', 'shlib')