I apologize in advance if this is a stupid question but it has been at least 10 years since I’ve done any serious C++ programming so I hope I’m just missing something.
I want to use the MidiBuffer iterator and the signature of getNextEvent requires the first parameter to be a MidiMessage.
However, there doesn’t seem to be a way to declare a local MidiMessage variable without actually initializing it to something even though I have no use for any of those initial values.
According to the documentation, all the constructors for MidiMessage require one or more parameters. While I understand it’s just a few bytes and not expensive, it seems odd, particularly when one is in a highspeed callback such as processBlock where every CPU cycle counts and so I’m assuming I’ve forgotten something about local variables are supposed to be declared.
Would appreciate someone reminding me how this is supposed to work.