diff --git a/src/yaw-shep/dsp.cpp b/src/yaw-shep/dsp.cpp index e9a384d..936ff5b 100644 --- a/src/yaw-shep/dsp.cpp +++ b/src/yaw-shep/dsp.cpp @@ -26,7 +26,7 @@ protected: void initParameter(uint32_t index, Parameter& parameter) override { - parameter.hints = kParameterIsAutomable; + parameter.hints = kParameterIsAutomatable; parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; @@ -86,10 +86,17 @@ protected: const MidiEvent* midiEvents, uint32_t midiEventCount) override { + uint32_t currentFrame = 0; + if( midiEventCount > 1 ) + { + currentFrame = 0; + } + for (uint32_t i = 0; i < midiEventCount; ++i) { if (midiEvents[i].size <= 3) { + uint8_t status = midiEvents[i].data[0]; uint8_t data = midiEvents[i].data[1] & 127; uint8_t velocity = midiEvents[i].data[2] & 127; @@ -119,10 +126,13 @@ protected: break; } + + synth.process(*outputs, midiEvents[i].frame - currentFrame); + currentFrame = midiEvents[i].frame; } } - synth.process(*outputs, frames); + synth.process(*outputs, frames - currentFrame); fParameters[kHz] = synth.hzFund; } diff --git a/src/yaw-shep/ui.cpp b/src/yaw-shep/ui.cpp index 7a7dfc0..a62b019 100644 --- a/src/yaw-shep/ui.cpp +++ b/src/yaw-shep/ui.cpp @@ -42,6 +42,7 @@ void MouseUI::parameterChanged(uint32_t index, float value) void MouseUI::uiIdle() { + repaint(); } bool MouseUI::onMouse(const MouseEvent &ev)