I'm trying to determine the time signature of a midi file in Python using music21. I can obtain the time signature of this sample midi for instance with:
import music21
path = 'ambrosia.midi'
score = music21.converter.parse(path)
time_signature = score.parts[0].timeSignature.ratioString
However, when I pass this midi instead, score.parts[0].timeSignature
is None
. Do others know the proper way to obtain the time signature with music21?