music21: parsing notes and durations per track
问题 I'm trying to use music21 to convert multi-track midi files into array of notes and durations per each track. For example, given a midi file test.mid with 16 tracks in it, I would like to get 16 arrays of tuples, consisting of (pitch, duration (plus maybe position of the note)). Documentation for music21 is rather difficult to follow, and I would really appreciate any help on this.. 回答1: There is more than one way to do this in music21, so this is just one simple way. Note that the durational