C++11 style iteration for MidiBuffer


Would it be possible/sensible to implement support for the C++11 range based for loops in the MidiBuffer class? At the moment, having to use the MidiBuffer::Iterator etc is somewhat painful and messy.


Yes please… +1


It’s a little bit awkward because it needs to return both a message and time, but I guess the value the iterator produces could be a struct with a buffer pointer, size and time.


or a std::pair<MidiBuffer, int>?


Not really - you don’t really want to be passing a by-value copy of the message around, because this will often be called on the audio thread