Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc_order requirement in export_match #326

Closed
sildater opened this issue Oct 11, 2023 · 0 comments · Fixed by #328
Closed

doc_order requirement in export_match #326

sildater opened this issue Oct 11, 2023 · 0 comments · Fixed by #328
Labels
bug Something isn't working

Comments

@sildater
Copy link
Member

The current matchfile_from_alignment from alignment uses the document order of notes in line 361 (exportmatch,py)

snote_sort_info[snote.id] = (onset_beats, snote.doc_order)

to later on sort by this value in line 460 ff

sort_stime = np.array(sort_stime)
sort_stime_idx = np.lexsort((sort_stime[:, 1], sort_stime[:, 0]))
note_lines = np.array(note_lines)[sort_stime_idx]

doc_order is a standard note property but it's only used for musicxml files so far. Scores/parts imported from match/mei/kern/midi do not have this property and the sorting breaks. A doc_order property shouldn't be a hard requirement though.

@sildater sildater added the bug Something isn't working label Oct 11, 2023
@sildater sildater linked a pull request Oct 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants