CPJKU / partitura

A python package for handling modern staff notation of music
https://partitura.readthedocs.io
Apache License 2.0
228 stars 15 forks source link

Performance expressions #249

Closed anusfoil closed 1 year ago

anusfoil commented 1 year ago

Fixed minor bugs in performance features after run-through of ASAP data:

  1. Edge cases that generates nan in correlation features.
  2. Onset boundary detection in incr-decr ramps.
  3. Edge case for interp1d when there is no pedal controls.
anusfoil commented 1 year ago

TODO: Discuss what to do with negative beat period when notes' performed order is reversed from the score order. This affects the bp, duration, kor calculation and is the main source of warnings generated.

manoskary commented 1 year ago

TODO: Discuss what to do with negative beat period when notes' performed order is reversed from the score order. This affects the bp, duration, kor calculation and is the main source of warnings generated.

A solution would be to use the function monotonize_times and replace their beat period with an interpolated value. We have to verify that motonize_times works as expected for beat period and timing. We should have an option (flag) ensure_lossless=True then beat period would be the interpolated beat period but the timing should change the order of the note, when False beat period would be the interpolated but timing would be 0.

In any case, since that could also be misalignment we should present some statistics to see the number of cases (in curated datasets such as ASAP, Vienna4x22) and see if it would be even possible to correct.

anusfoil commented 1 year ago

Added several lines to ensure that monotonize_times actually output a monotonic sequence. Issue #251

sildater commented 1 year ago

@neosatrapahereje could you have a look at the changes in monotonize_times()? I don't really know this function. It also needs an updated docstring.

manoskary commented 1 year ago

Does this PR address issue #244 ?

anusfoil commented 1 year ago

No, that I think is a note feature parsing issue