music - Showing midi pitch numbers from Mid file with music21 -
i using music21 extract midi pitch numbers (in order) bunch of midi files.
i have been reading through documentation , can load 1 file this:
from music21 import * sbach = corpus.parse('bach/bwv7.7')
now how show sequence of midi numbers? sure possible can't find function in documentation.
and there way multiple files @ same time?
from music21 import * sbach = corpus.parse('bach/bwv7.7') p in sbach.parts: print("part: ", p.id) n in p.flat.notes: print(n.midi)
note ".notes" includes chords, don't have .midi property. complex scores may need separate out chords notes. think you'll want go through music21 user's guide bit more before continuing.
Comments
Post a Comment