MidiFile.flattenedTrackStream

Returns a forward range for playback or analysis that flattens the midi tracks into a single stream. Each item is a command, which is like the midi event but with some more annotations and control methods.

Modifying this MidiFile object or any of its children during iteration may cause trouble.

Note that you do not need to handle any meta events, it keeps the tempo internally, but you can look at it if you like.

class MidiFile
FlattenedTrackStream
flattenedTrackStream
()

Meta