CPJKU / partitura

A python package for handling modern staff notation of music

Home Page:https://partitura.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slurs in ASAP data are not parsed by partitura

anusfoil opened this issue · comments

For this example, I was trying to get the articulation information from note array with the slur feature. The following is the minimal snippet from note_features that attempts to take the slurs. However, the returned slurs contains no data while in the following xml visualization we can see a lot of slurs.

score_path = 'Datasets/asap-dataset-alignment/Brahms/Six_Pieces_op_118/2/xml_score.musicxml'
score = pt.score.unfold_part_maximal(pt.score.merge_parts(pt.load_musicxml(score_path).parts)) 
part = score.merge_parts(score)
slurs = part.iter_all(score.Slur)

I believe this applies for all ASAP data, as I was running legato articulation statistics for ASAP and turns out no legato notes are found. (Applying the same code to Vienna422 dataset is fine)

image

Looks like it's caused by pt.score.unfold_score_maximal. Unfolding the repeat sections would leave out the slur marking. After removing this action (which I would need to correspond with alignment) the slurs in score are parsed successfully. Is this an expected behavior? Anyways to get around?

good catch! the making of score variants into parts somehow loses all slurs, possibly due to some note ID issue. I'll see if I find a workaround.

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?