From 0fe57ff01782d470b8c1d6e44a21d3cbeae7235a Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Sun, 13 Oct 2024 21:07:01 +0100 Subject: [PATCH] breaks up into 4.3ms blocks correctly --- plugin/ic1.cpp | 2 +- plugin/ic29.cpp | 15 +++++++------- plugin/ic29.hpp | 2 -- plugin/peacock.cpp | 49 ++++++++++++++++++++++++++++++++++++++++------ plugin/peacock.hpp | 21 ++++++++++---------- 5 files changed, 63 insertions(+), 26 deletions(-) diff --git a/plugin/ic1.cpp b/plugin/ic1.cpp index 7cdd28f..9d0d811 100644 --- a/plugin/ic1.cpp +++ b/plugin/ic1.cpp @@ -48,7 +48,7 @@ void Assigner::handleMidi(const MidiEvent *ev) { noteOn(ev->data[1]); break; default: - printf("handle event, status %02x value %02x\n", ev->data[0], ev->data[1]); + d_debug("unhandled MIDI event, status %02x value %02x\n", ev->data[0], ev->data[1]); break; } } diff --git a/plugin/ic29.cpp b/plugin/ic29.cpp index c1d2185..ebdc626 100644 --- a/plugin/ic29.cpp +++ b/plugin/ic29.cpp @@ -18,23 +18,21 @@ #include "ic29.hpp" - Synth s; - Synth::Synth() { - printf("initialising synth\n"); + d_debug("initialising synth\n"); envAtk = 0x007f; envDcy = envRls = 0xfe90; envStn = 0x1fff; } void Synth::run() { - //printf("called synth::run()\n"); - //printf("%d\n", voices[0].env.phase); - for (uint8_t i=0; i timeLimit) break; // exceeded the time limit + ic1.handleMidi((const MidiEvent *)&ev[i]); + } +} + void Peacock::run(const float **, float **outputs, uint32_t frames, const MidiEvent *midiEvents, uint32_t midiEventCount) { // no content yet // dispose of parameters (void)outputs; - (void)frames; - //printf("got %d MIDI events\n", midiEventCount); - for(uint32_t i=0; i