Is there any way to detect modulation from midi using Music21?

86 Views Asked by At

I have this code, as part of a project to read and interpret a MIDI file:

midi_data = m21.converter.parse(midi_file)
key = midi_data.analyze('key')
print(key.name)

I need to get the key information. With this code, the first key is shown, but it does not correspond to a modulation.

How can I detect modulations?

0

There are 0 best solutions below