Skip to content

load_match(score_part=True) doesn't load all notes in score_part #162

@huispaty

Description

@huispaty

Hello! I noticed a strange behaviour for the function load_match() with (admittedly also a somewhat strange/unusual) match file (see kv333_3.txt(matchfile as txt file) attached):

  • What's strange about the match file: For measure 198, the beats get counted up to 16 (instead of 2) - this is a result of a change on the matchfile to represent an extended measure (see score image attached). In the original version of the matchfile (see kv333_3_orig.txt attached), all notes for this measure 198 were split on two beats, and most had the same offset, duration, and onsetInBeats and offsetInBeats (only shifted by 1 at the point where the beat split occurred, which was then set at the triller C (198:6 in the image attached)). In the updated version (kv333_3.txt), the beats in measure:beat get counted up, the offset is updated according to the note position relative to the beat, the duration is updated to the notated score duration and the onsetInBeats and offsetInBeats are added up according to the duration.
    As a result of all these changes, the onsetInBeats and offsetInBeats in total add up, so for all the notes after this extended measure (starting from score note n2848 / performed note 2848) the onsetInBeats and offsetInBeats values were adjusted by shifting them for 13 beats.
  • What's the strange behaviour now when loading a score from this matchfile using load_match(): the note_array() from this score_part only includes notes up to score note n2847 which is the last note of the extended measure. The rest of the score part is not processed.

grafik

[kv333_3_orig.txt](https://github.com/CPJKU/partitura/files/9809449/kv333_3_orig.txt) [kv333_3.txt](https://github.com/CPJKU/partitura/files/9809450/kv333_3.txt)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions