summaryrefslogtreecommitdiffstats
path: root/src/server/internals
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-17 02:14:07 +0000
committerDavid Robillard <d@drobilla.net>2012-08-17 02:14:07 +0000
commit318b37d8b556add13b3f156f31c9e72eca339a16 (patch)
treeca7b881f8980a41eca77602b474f29964b5c89db /src/server/internals
parenta42744e1068a8630d8034df73bb344ca21a53b32 (diff)
downloadingen-318b37d8b556add13b3f156f31c9e72eca339a16.tar.gz
ingen-318b37d8b556add13b3f156f31c9e72eca339a16.tar.bz2
ingen-318b37d8b556add13b3f156f31c9e72eca339a16.zip
Implement real logging system, LV2 log extension support, and purge evil/ugly/untranslatable C++ stream printing.
Remove coloured log stuff from Raul. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4717 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/internals')
-rw-r--r--src/server/internals/Delay.cpp3
-rw-r--r--src/server/internals/Note.cpp37
-rw-r--r--src/server/internals/Trigger.cpp7
3 files changed, 0 insertions, 47 deletions
diff --git a/src/server/internals/Delay.cpp b/src/server/internals/Delay.cpp
index d64f7a8f..26799260 100644
--- a/src/server/internals/Delay.cpp
+++ b/src/server/internals/Delay.cpp
@@ -21,7 +21,6 @@
#include "ingen/URIs.hpp"
#include "raul/Array.hpp"
#include "raul/Maid.hpp"
-#include "raul/log.hpp"
#include "Buffer.hpp"
#include "Driver.hpp"
@@ -34,8 +33,6 @@
#include "internals/Delay.hpp"
#include "util.hpp"
-#define LOG(s) s << "[DelayNode] "
-
#define CALC_DELAY(delaytime) \
(f_clamp (delaytime * (float)sample_rate, 1.0f, (float)(buffer_mask + 1)))
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index 81562f83..25e8aee5 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -21,7 +21,6 @@
#include "lv2/lv2plug.in/ns/ext/midi/midi.h"
#include "raul/Array.hpp"
#include "raul/Maid.hpp"
-#include "raul/log.hpp"
#include "Buffer.hpp"
#include "Driver.hpp"
@@ -34,8 +33,6 @@
#include "internals/Note.hpp"
#include "util.hpp"
-#define LOG(s) s << "[NoteNode] "
-
// #define NOTE_DEBUG 1
using namespace std;
@@ -190,9 +187,6 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
uint32_t voice_num = 0;
if (key->state != Key::OFF) {
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Double midi note received" << endl;
-#endif
return;
}
@@ -221,19 +215,11 @@ NoteNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity, F
assert(voice != NULL);
assert(voice == &(*_voices)[voice_num]);
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Note " << (int)note_num << " on @ " << time
- << ". Voice " << voice_num << " / " << _polyphony << endl;
-#endif
-
// Update stolen key, if applicable
if (voice->state == Voice::Voice::ACTIVE) {
assert(_keys[voice->note].state == Key::ON_ASSIGNED);
assert(_keys[voice->note].voice == voice_num);
_keys[voice->note].state = Key::Key::ON_UNASSIGNED;
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Stole voice " << voice_num << endl;
-#endif
}
// Store key information for later reallocation on note off
@@ -268,31 +254,15 @@ NoteNode::note_off(ProcessContext& context, uint8_t note_num, FrameTime time)
Key* key = &_keys[note_num];
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Note " << (int)note_num << " off @ " << time << endl;
-#endif
-
if (key->state == Key::ON_ASSIGNED) {
// Assigned key, turn off voice and key
if ((*_voices)[key->voice].state == Voice::ACTIVE) {
assert((*_voices)[key->voice].note == note_num);
-
if ( ! _sustain) {
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Free voice " << key->voice << endl;
-#endif
free_voice(context, key->voice, time);
} else {
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Hold voice " << key->voice << endl;
-#endif
(*_voices)[key->voice].state = Voice::HOLDING;
}
-
- } else {
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "WARNING: Assigned key, but voice not active" << endl;
-#endif
}
}
@@ -331,9 +301,6 @@ NoteNode::free_voice(ProcessContext& context, uint32_t voice, FrameTime time)
(*_voices)[voice].state = Voice::ACTIVE;
} else {
// No new note for voice, deactivate (set gate low)
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "Note off: key " << (int)(*_voices)[voice].note << " voice " << voice << endl;
-#endif
_gate_port->set_voice_value(context, voice, time, 0.0f);
(*_voices)[voice].state = Voice::FREE;
}
@@ -344,10 +311,6 @@ NoteNode::all_notes_off(ProcessContext& context, FrameTime time)
{
assert(time >= context.start() && time <= context.end());
-#ifdef NOTE_DEBUG
- LOG(Raul::debug) << "All notes off @ " << time << endl;
-#endif
-
// FIXME: set all keys to Key::OFF?
for (uint32_t i = 0; i < _polyphony; ++i) {
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index 81361bb8..f7bbd4c5 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -19,7 +19,6 @@
#include "ingen/URIs.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/util.h"
#include "lv2/lv2plug.in/ns/ext/midi/midi.h"
-#include "raul/log.hpp"
#include "Buffer.hpp"
#include "Engine.hpp"
@@ -31,8 +30,6 @@
#include "internals/Trigger.hpp"
#include "util.hpp"
-#define LOG(s) s << "[TriggerNode] "
-
using namespace std;
namespace Ingen {
@@ -140,10 +137,6 @@ TriggerNode::note_on(ProcessContext& context, uint8_t note_num, uint8_t velocity
_learning = false;
}
-#ifdef RAUL_LOG_DEBUG
- LOG(Raul::debug) << path() << " note " << (int)note_num << " on @ " << time << endl;
-#endif
-
Sample filter_note = _note_port->buffer(0)->value_at(0);
if (filter_note >= 0.0 && filter_note < 127.0 && (note_num == (uint8_t)filter_note)) {
_gate_port->set_control_value(context, time, 1.0f);