yaw-shep bug fixes:
handle MIDI events at correct frame; display cursor at correct position
This commit is contained in:
parent
f60f589359
commit
994ff19596
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ void MouseUI::parameterChanged(uint32_t index, float value)
|
|||
|
||||
void MouseUI::uiIdle()
|
||||
{
|
||||
repaint();
|
||||
}
|
||||
|
||||
bool MouseUI::onMouse(const MouseEvent &ev)
|
||||
|
|
Loading…
Reference in New Issue