diff options
author | David Robillard <d@drobilla.net> | 2007-09-30 21:12:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-30 21:12:16 +0000 |
commit | 399ddfc5b1d4f1f131362d0439821778c6681b23 (patch) | |
tree | e8ca2536fa251f474817d0575bc3b4747c494954 /src/libs/engine/events/NoteOffEvent.cpp | |
parent | c40ddfc0eebbcb3333d6cc9e3df7fb62ecb45941 (diff) | |
download | ingen-399ddfc5b1d4f1f131362d0439821778c6681b23.tar.gz ingen-399ddfc5b1d4f1f131362d0439821778c6681b23.tar.bz2 ingen-399ddfc5b1d4f1f131362d0439821778c6681b23.zip |
Better design for process() signature (pass everything needed in a single object parameter).
Working port "monitoring" (connect an output to a control input, GUI will animate controller).
git-svn-id: http://svn.drobilla.net/lad/ingen@788 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/NoteOffEvent.cpp')
-rw-r--r-- | src/libs/engine/events/NoteOffEvent.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp index 4f683903..f560f250 100644 --- a/src/libs/engine/events/NoteOffEvent.cpp +++ b/src/libs/engine/events/NoteOffEvent.cpp @@ -23,6 +23,7 @@ #include "Plugin.hpp" #include "MidiNoteNode.hpp" #include "MidiTriggerNode.hpp" +#include "ProcessContext.hpp" namespace Ingen { @@ -49,10 +50,10 @@ NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, Sampl void -NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) +NoteOffEvent::execute(ProcessContext& context) { - Event::execute(nframes, start, end); - assert(_time >= start && _time <= end); + Event::execute(context); + assert(_time >= context.start() && _time <= context.end()); if (_node == NULL && _node_path != "") _node = _engine.object_store()->find_node(_node_path); @@ -60,9 +61,9 @@ NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end) // FIXME: this isn't very good at all. if (_node != NULL && _node->plugin()->type() == Plugin::Internal) { if (_node->plugin()->plug_label() == "note_in") - ((MidiNoteNode*)_node)->note_off(_note_num, _time, nframes, start, end); + ((MidiNoteNode*)_node)->note_off(_note_num, _time, context); else if (_node->plugin()->plug_label() == "trigger_in") - ((MidiTriggerNode*)_node)->note_off(_note_num, _time, nframes, start, end); + ((MidiTriggerNode*)_node)->note_off(_note_num, _time, context); } } |