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

@@ -7,22 +7,22 @@
}
\begin{verse}
Near Ban \chord{e}bridge Town in the Cou \chord{G}nty Dow \chord{D}n \\
one m \chord{G}orning la \chord{e}st \chord{D} July, \\
Down a bo \chord{e}reen green came a sweet \chord{G} Colleen. \\
And she sm \chord{G}iled as she pas \chord{C}sed me b \chord{D}y. \\
Oh, she lo \chord{G}oked so sweet \\
from her t \chord{a}wo white feet. \\
To the sh \chord{G}een of her n \chord{e}ut-brown hai \chord{D}r. \\
Such a co \chord{e}axing elf, Id to s \chord{G}hake mys \chord{D}elf. \\
To make sur \chord{e}e I was sta \chord{C}nd \chord{D}ing the \chord{e}re.
Near \chord{e}Banbridge Town in the \chord{G}County \chord{D}Down \\
one \chord{G}morning \chord{e}last \chord{D}July, \\
Down a \chord{e}boreen green came a sweet \chord{G}Colleen. \\
And she \chord{G}smiled as she \chord{C}passed me \chord{D}by. \\
Oh, she \chord{G}looked so sweet \\
from her \chord{a}two white feet. \\
To the \chord{G}sheen of her \chord{e}nut-brown \chord{D}hair. \\
Such a \chord{e}coaxing elf, Id to \chord{G}shake \chord{D}myself. \\
To make \chord{e}sure I was \chord{D}standing \chord{e}there.
\end{verse}
\begin{verse}
/: From Ba \chord{G}ntry Bay up to Der \chord{a}ry Quay \\
and from Gal \chord{G}way to Du \chord{e}blin tow \chord{D}n, \\
No maid \chord{e} I've seen like the f \chord{G}air colle \chord{D}en, \\
that I m \chord{e}et in the \chord{C}Co \chord{D}unty D \chord{e}own. :/
/: From \chord{G}Bantry Bay up to \chord{a}Derry Quay \\
and from \chord{G}Galway to \chord{e}Dublin \chord{D}town, \\
No maid \chord{e}I've seen like the \chord{G}fair \chord{D}colleen, \\
that I \chord{e}met in the \chord{D}County \chord{e}Down. :/
\end{verse}
\begin{verse}