Skip to content

Commit

Permalink
- fix MIDI messages being ignored around Ableton sequencer loop points
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-hart committed Dec 8, 2024
1 parent d890255 commit 0bf3e5c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hi_core/hi_core/MainControllerHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,27 @@ void DelayedRenderer::processWrapped(AudioSampleBuffer& buffer, MidiBuffer& midi
}
else
{
if(!shortBuffer.isEmpty())
{
MidiBuffer::Iterator it(midiMessages);

delayedMidiBuffer.clear();

MidiMessage m;
int pos;

for (auto& e : shortBuffer)
delayedMidiBuffer.addEvent(e.toMidiMesage(), e.getTimeStamp());

while (it.getNextEvent(m, pos))
delayedMidiBuffer.addEvent(m, jmin(pos + lastBlockSizeForShortBuffer, buffer.getNumSamples()));

delayedMidiBuffer.swapWith(midiMessages);

shortBuffer.clear();
lastBlockSizeForShortBuffer = 0;
}

mc->processBlockCommon(buffer, midiMessages);
}
}
Expand Down

1 comment on commit 0bf3e5c

@dabbudebendra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No currentGithash.txt and currentGit.h Please fix it. Showing wrong commit No.

Please sign in to comment.