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

@@ -10,13 +10,13 @@
}
\begin{verse}
\chord{d}Am Westermanns Lönstief pfeift e \chord{g}isiger W \chord{d}ind. \\
Uns s \chord{g}chaukelt die S \chord{d}ee wie die M \chord{A}utter ihr \chord{d}Kind. \\
\chord{C}Am \chord{F} Westermanns L \chord{C}önstief ist a \chord{F}lles so gr \chord{C}au, \\
wir f \chord{g}angen den H \chord{d}ering, den K \chord{A}ab \chord{d}eljau. \\
\chord{d}Am Westermanns Lönstief pfeift \chord{g}eisiger \chord{d}Wind. \\
Uns \chord{g}schaukelt die \chord{d}See wie die \chord{A}Mutter ihr \chord{d}Kind. \\
\chord{C}Am \chord{F}Westermanns \chord{C}Lönstief ist \chord{F}alles so \chord{C}grau, \\
wir \chord{g}fangen den \chord{d}Hering, den \chord{d}Kabeljau. \\
Ref: \\
Tschire \chord{g}e macht die S \chord{d}ee, tschi \chord{A}ra, tschi \chord{d}ree, \\
tschir \chord{g}ee macht die \chord{d}See, tsch \chord{A}ira-ha-ha-ha tschi \chord{d}re \chord{F}e \chord{C}.
\chord{g}Tschiree macht die \chord{d}See, \chord{A}tschira, \chord{d}tschiree, \\
\chord{g}tschiree macht die \chord{d}See, \chord{A}tschira-ha-ha-ha \chord{C}tschiree.
\end{verse}
\begin{verse}