Separating parts in Orchestral musicxml

29 views
Skip to first unread message

Taylor Akin

unread,
Mar 1, 2023, 1:58:36 PM3/1/23
to music21
Hello all,

I'm having a problem where I parse a musicxml score, as I want to do some analysis on it. I want to look specifically at the first bassoon part, but so many MIDI and musicXML files have multiple parts shoved into one part (i.e., Bassoon 1, Bassoon 2 or both in the Fagotti line). The end goal is to have the first bassoon part in a pandas data frame. Does anyone have any ideas on how I could separate them or tell them apart? Like voice information that might indicate which note belongs to which part? I've tried sorting by note and dropping the duplicates of the same offset, but this is hacky and not really seeming to work that well. Any suggestions would be greatly appreciated!

Best,
Taylor

mrhg...@gmail.com

unread,
Apr 23, 2023, 10:19:46 AM4/23/23
to music21
Good question. I don't think there's anything out there for this and I've been meaning to write up something that would do a plausible job of it.

Some "how to" notes:
  • 2+ voices = split (obv.!)
  • chords with 2+ notes can obviously be split too (at least in classical orchestral parts).
  • any clearly indicative text like "a1", "a2", etc.
    • Probably need to deduce end point by guess work from the rests.
Some other notes:
  • This will never be 100% but may be enough depending on your use case.
  • It's easier to code the reverse (compress 2 verbose parts into a shorthand shared one)
    • Partly for that reason, some encoding efforts chose to encode the verbose form (let me know if you want examples that could serve as a test case).
  • Some close source software supports both forms (the "parts" and "score" versions simultaneously) but
    • it's closed source so we don't know exactly how
    • the actual music is encoded by the user, so this is just a data structure and not (AFAIK) ever reverse engineering in the way we're discussing here
Happy to discuss further if you like. And I may have some code somewhere too ... 

Best,
Mark

Reply all
Reply to author
Forward
0 new messages