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

@@ -8,17 +8,17 @@
}
\begin{verse}
S \chord{H7}iebzehn Tage fäh \chord{e}rt das Schiff, durch Ne \chord{a}bel Wellen, \\
Gi \chord{H7}scht. Und wir ha \chord{C}ben keinen Kur \chord{H7}s und auch \chord{a} zu ess \chord{H7}en \\
n \chord{e}icht. Wir t \chord{F}asten uns v \chord{C}or \chord{a}, durch die graue W \chord{H7}and, fast \\
s \chord{F}tirbt in uns s \chord{e}chon die H \chord{C}offnung auf L \chord{H7}and.
\chord{H7}Siebzehn Tage \chord{e}fährt das Schiff, durch \chord{a}Nebel Wellen, \\
\chord{H7}Gischt. Und wir \chord{C}haben keinen \chord{H7}Kurs und auch \chord{a}zu \chord{H7}essen \\
\chord{e}nicht. Wir \chord{F}tasten uns \chord{a}vor, durch die graue \chord{H7}Wand, fast \\
\chord{F}stirbt in uns \chord{e}schon die \chord{C}Hoffnung auf \chord{H7}Land.
\end{verse}
\begin{verse}
Ref.: \\
Wir fahrn dah \chord{e}in, wir fahrn da \chord{a}hin, wir fahrn da \chord{e}hin, auf \\
hoher Se \chord{H7}e, wir fahrn dahi \chord{e}n, durch graue Not \chord{C}, wir \\
fahrn da \chord{e}hin, denn unser Ste \chord{H7}uermann ist tot.
Wir fahrn \chord{e}dahin, wir fahrn \chord{a}dahin, wir fahrn \chord{e}dahin, auf \\
hoher \chord{H7}See, wir fahrn \chord{e}dahin, durch graue \chord{C}Not, wir \\
fahrn \chord{e}dahin, denn unser \chord{H7}Steuermann ist tot.
\end{verse}
\begin{verse}