Skip to content

(AI) Import aligned ABC lyric fields - #1992

Draft
tomatotomata wants to merge 2 commits into
cuthbertLab:masterfrom
tomatotomata:codex/abc-lyrics-696
Draft

(AI) Import aligned ABC lyric fields#1992
tomatotomata wants to merge 2 commits into
cuthbertLab:masterfrom
tomatotomata:codex/abc-lyrics-696

Conversation

@tomatotomata

@tomatotomata tomatotomata commented Jul 30, 2026

Copy link
Copy Markdown

Fixes #696

Summary

  • Attach w: lyric syllables to parsed notes, including lyric fields placed after bar-delimited music.
  • Preserve ABC hyphenated-syllable and * skip behavior.
  • Ignore surplus lyric syllables after the final parsed note instead of raising or misaligning later state.
  • Bump the beta patch version because ABC parsing output changes.

Validation

  • python -m uv run python -m unittest music21.abcFormat.translate (20 tests) was attempted, but this sparse checkout does not include the rest of the music21 package dependencies.
  • python -m py_compile music21/abcFormat/translate.py passes.
  • git diff --check passes.
  • Full multiprocess validation remains unavailable because this checkout lacks the package and LilyPond is not installed locally.

AI disclosure

This pull request is entirely AI-written and submitted with the repository's required AI disclosure. The implementation and test scope were checked against issue #696 and the ABC 2.1 lyric-alignment behavior.

@mscuthbert

Copy link
Copy Markdown
Member

Please reformat your message to be legible.

Please add failure modes--what if there are more lyrics than notes? Fail gracefully according to precedent.

Thanks!

@tomatotomata

Copy link
Copy Markdown
Author

I reformatted the PR description so the sections render normally, and pushed 81a5d961 with a regression test for more lyric syllables than notes. The parser now keeps the available lyrics and exits cleanly once the note targets are exhausted. I also added the required AI-assisted note to the new test. The sparse checkout passes py_compile and git diff --check; the full unittest command cannot import the rest of music21 from this checkout. Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capture lyrics when parsing ABC

2 participants