Skip to content

Commit

Permalink
Merge pull request #379 from CPJKU/fix_issue_378
Browse files Browse the repository at this point in the history
Fix issue 378
  • Loading branch information
CarlosCancino-Chacon authored Oct 2, 2024
2 parents 824a39b + 9754a90 commit 3520066
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions partitura/musicanalysis/performance_codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,14 @@ def get_matched_notes(spart_note_array, ppart_note_array, alignment):
p_idx = int(p_idx)
matched_idxs.append((s_idx, p_idx))

if len(matched_idxs) == 0:
warnings.warn(
"No matched note IDs found. "
"Either the alignment contains no matches "
"or the IDs in score of performance do not correspond to the alignment "
"(maybe due to repeat unfolding)."
)

return np.array(matched_idxs)


Expand Down

0 comments on commit 3520066

Please sign in to comment.