extend melisma line through notes marked with standalone _ in lyrics#1148
Open
oddeyed wants to merge 1 commit into
Open
extend melisma line through notes marked with standalone _ in lyrics#1148oddeyed wants to merge 1 commit into
oddeyed wants to merge 1 commit into
Conversation
…rics
Per ABC 2.1, a standalone _ in a w: field should draw a continuation
line under the note. The parser was attaching {syllable: "", divider: " "}
to those notes, so the renderer had nothing to draw. Now it uses
divider: "_" for skip-to-slur entries, matching the divider used when
a syllable ends with _.
Adds a parse test covering both single and multiple consecutive _ usage.
Co-Authored-By: Ben Janoff <ben.janoff@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
I forgot to include the input that generated my above examples: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Paul, first of all: thank you for the excellent library.
While working on a personal project using the library, I noticed that the lyrics continuation line doesn't appear when it is present in the input w: field.
According to the standard for ABC 2.1, a standalone _ in a w: field should draw a continuation line under the note. For instance, in example 5 in the Lyrics section on this page, the "ble" is continued until the final note in the line.
Instead, in a similar arrangement, the output from abcjs looks like this, where the should be underscore continuations.
This fix doesn't do exactly the same behaviour as in the reference above, but instead by setting both the divider and the syllable in the parser output to
_, each continuation syllable has an underscore which sets a clearer intent for the reader of the music - as shown in the new output below.This PR adds a parse test covering both single and multiple consecutive _ usage.
I'll acknowledge that I wrote this with Claude Code but I couldn't see an explicit AI-assisted code generation policy for your project.