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,12 +7,12 @@
}
\begin{verse}
By a l \chord{D}onely prison wall, \\
I h \chord{G}eard a young girl c \chord{D}al \chord{A}ling: \\
Mi \chord{D}chael, they have t \chord{G}aken you away \chord{A}, \\
for you st \chord{D}ole Trevelyn's co \chord{G}rn, \\
so the yo \chord{D}ung might see the morn \chord{A}. \\
Now a prison ship lies waiting in the b \chord{D}ay.
By a \chord{D}lonely prison wall, \\
I \chord{G}heard a young girl \chord{A}calling: \\
\chord{D}Michael, they have \chord{G}taken you \chord{A}away, \\
for you \chord{D}stole Trevelyn's \chord{G}corn, \\
so the \chord{D}young might see the \chord{A}morn. \\
Now a prison ship lies waiting in the \chord{D}bay.
\end{verse}
\begin{verse}
@@ -20,11 +20,11 @@ Ref.:
\end{verse}
\begin{verse}
L \chord{D}ow \chord{G} lie the Fi \chord{D}elds of Athenry \\
where once \chord{D} we watched the small free birds fl \chord{A}y. \\
Our lo \chord{D}ve was on the wing \chord{G}, we had dreams \chord{D} and \\
songs to sin \chord{A}g, \\
it's so lonely 'round the Fields of Athenr \chord{D}y.
\chord{D}Low \chord{G}lie the \chord{D}Fields of Athenry \\
where once \chord{D}we watched the small free birds \chord{A}fly. \\
Our \chord{D}love was on the \chord{G}wing, we had dreams \chord{D}and \\
songs to \chord{A}sing, \\
it's so lonely 'round the Fields of \chord{D}Athenry.
\end{verse}
\begin{verse}