Fix chord alignment: snap to word boundaries

Improve merge_chord_lyric() to snap chord positions to the start
of the word they fall within, instead of splitting words mid-way.
Fixes artifacts like "Liebespaar \chord{C}e" → "\chord{C}Liebespaare".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-04-02 16:36:06 +02:00
parent d875fd225b
commit 7b99778f67
295 changed files with 1804 additions and 1782 deletions

View File

@@ -6,17 +6,17 @@
}
\begin{verse}
I \chord{G}danced in the morning when the w \chord{e}orld was be \chord{G}gun, \\
I d \chord{a}anced in the moon and the s \chord{D}tars and the sun, \\
I c \chord{G}ame down from heaven and I d \chord{e}anced on the earth, \\
At B \chord{a}ethleh \chord{D}em I h \chord{C}ad my b \chord{G}irth.
I \chord{G}danced in the morning when the \chord{e}world was \chord{G}begun, \\
I \chord{a}danced in the moon and the \chord{D}stars and the sun, \\
I \chord{G}came down from heaven and I \chord{e}danced on the earth, \\
At \chord{D}Bethlehem I \chord{C}had my \chord{G}birth.
\end{verse}
\begin{verse}
Ref.: D \chord{G}ance, dance, wher \chord{e}ever you may be, \\
Ref.: \chord{G}Dance, dance, \chord{e}wherever you may be, \\
\chord{G}I am the Lord of the \chord{D}Dance, said he, \\
and I'll l \chord{G}ead you \chord{e}all, wher \chord{G}ever you may be, \\
And I'll \chord{D}lead you all in the D \chord{G}ance, s \chord{D}ai \chord{G}d he.
and I'll \chord{G}lead you \chord{e}all, \chord{G}wherever you may be, \\
And I'll \chord{D}lead you all in the \chord{G}Dance, \chord{G}said he.
\end{verse}
\begin{verse}