Open leleogere opened 1 month ago
Hello! Thank you for raising this issue! I'll fix the import in the tutorial. As for the second error: you get this warning because the note IDs in the score note array and in the alignment do not correspond. If you print them, you see that the alignment contains note IDs ending with "-1" which indicates the number of repeats. The reason is that for the match files of (n)ASAP all score notes have a suffix, because the original IDs come from musicxml scores, but in the performance (and the corresponding match files) might contain repeats, jumps, etc. The fix is very short, just unfold (n)ASAP scores to the maximal length like so score_part = pt.score.unfold_part_maximal(score_part)
. Just do this before you extract the note array, then it should be fine. In some cases, you also need to merge the parts before, but not in your example score_part = pt.score.unfold_part_maximal(pt.score.merge_parts(score.parts))
. I hope that helps!
Works like a charm! Thank you!
I just realized that I missed the issue #348, already reporting this problem, and even more than that: it was already fixed in #368 by yourself, just not merged yet. Sorry for the duplicate report!
good catch! sorry for the slow merge/release process!
Hello,
I tried the example to generate tempo curves of two performances provided at https://partitura.readthedocs.io/en/latest/Tutorial/notebook.html#Comparing-tempo-curves
However, it does not seem to work anymore. First, it seems that the
get_time_maps_from_alignment
function has be moved frompt.utils.music
topt.musicanalysis.performance_codec
, and even when setting the correct path, I get errors about indexing:Here is a sample to reproduce the issue:
Python: 3.12 Partitura: 1.5.0