I want to extract the acoustic bass drum part in midi files and output it(acoustic bass drum.mid) in python. For examples, I have a lot of midi files, then I want to extract acoustic bass drum part in them and output it in programming.(in one time, which means, batch splitting)
Currently I only can import one midi file into MuseScore software and split the percussion staff, then export it. But I don't want to do it one by one, I want to do it in programming. Thank you.
music21
is what you are looking for, go check it out.