Skip to content

extend melisma line through notes marked with standalone _ in lyrics#1148

Open
oddeyed wants to merge 1 commit into
paulrosen:devfrom
oddeyed:fix/lyric-underscore-continuation
Open

extend melisma line through notes marked with standalone _ in lyrics#1148
oddeyed wants to merge 1 commit into
paulrosen:devfrom
oddeyed:fix/lyric-underscore-continuation

Conversation

@oddeyed

@oddeyed oddeyed commented Apr 20, 2026

Copy link
Copy Markdown

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.

image

Instead, in a similar arrangement, the output from abcjs looks like this, where the should be underscore continuations.

image

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.

image

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.

…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>
@oddeyed

oddeyed commented Apr 20, 2026

Copy link
Copy Markdown
Author

I forgot to include the input that generated my above examples:

X: 21
L:1/8
M:none
K:C
C (ED) C (CDEF GAGE DGE D2)
w: mu-NACH_ pa-ZER___________

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.

1 participant