i want to measure the musical lenght of a music21 stream. the stream is a short midi file exported from my DAW.
sequence = converter.parse('In MIDI/input.mid')
measures = sequence.getElementsByClass(stream.Measure)
num_measures = len(measures)
print(f"The Stream has {num_measures} measures.")
will output
The Stream has 0 measures.
What am i doing wrong?