Moved my projects to JUCE 6 today. Am now getting warnings on “Iterator” is deprecated.
Can someone kindly help explain how to rewrite this type of Midi Iterator with the new way? How to get the sample number?
I’m having some difficulty grokking this…
// iterate through the incoming MIDI and grab only events for a certain channel
MidiMessage msg;
int sampleNumber;
for (MidiBuffer::Iterator it (midiMessages); it.getNextEvent (msg, sampleNumber);)
{
if (msg.isForChannel(midiChannel))
copyBuffer.addEvent (msg, sampleNumber);
}
