How to Extract Individual Chords, Rests, and Notes from a midi file?
问题 I am making a program that should be able to extract the notes, rests, and chords from a certain midi file and write the respective pitch (in midi tone numbers - they go from 0-127) of the notes and chords to a csv file for later use. For this project, I am using the Python Library "Music21". from music21 import * import pandas as pd #SETUP path = r"Pirates_TheCarib_midi\1225766-Pirates_of_The_Caribbean_Medley.mid" #create a function for taking parsing and extracting the notes def extract