Closed almostimplemented closed 1 year ago
Hey, thanks a lot for this! I have to say I'm on the fence a bit as to whether this makes sense as a function in the core PrettyMIDI class. However, there are lots of things that should probably be external functions (basically anything that computes some features/alternative representation), so this is certainly within scope in that respect and I'll merge it. Thanks again.
Ah that is a fair point. When I looked at utilities.py
, I didn't see any existing methods that operate on PrettyMidi
objects directly. Plus I thought this is a bit similar to get_piano_roll
.
But say the word if you would like me to move it to utilities.py
! More than happy to. Thanks!
Hi @craffel , I use
pretty_midi
,mir_eval
, andmido
almost every day in my research. Thank you so much!This feature feels like it should exist in the field of MIR:
At first I thought, "I should open a PR in
mir_eval
for this", but I realized it would introduce a dependency or a custom rolled MIDI parser :-1: ... but it would be slick ifpretty_midi
could prepare the inputs formir_eval.transcription
(especially considering the projects have the same author... 😇 )With this change you can do:
and I think that's pretty cool.