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

@@ -11,16 +11,16 @@
}
\begin{verse}
We \chord{D}nn ich des Morgens fr \chord{G}üh aufst \chord{D}eh \\
und muss zur A \chord{G}rb \chord{D}ei \chord{A}t \chord{D}gehen, \\
dann kocht mir meine Mu \chord{G}tter T \chord{D}ee, \\
von dem ich k \chord{G}ei \chord{D}ne \chord{A}n \chord{D}nehme.
\chord{D}Wenn ich des Morgens \chord{G}früh \chord{D}aufsteh \\
und muss zur \chord{A}Arbeit \chord{D}gehen, \\
dann kocht mir meine \chord{G}Mutter \chord{D}Tee, \\
von dem ich \chord{A}keinen \chord{D}nehme.
\end{verse}
\begin{verse}
/:Ich will e Schn \chord{D}äpsje han is dat nit fein! \\
N \chord{G}ur noch Feue \chord{A}rwasser Branntewein nur noch \\
Schna \chord{D}ps:/
/:Ich will e \chord{D}Schnäpsje han is dat nit fein! \\
\chord{G}Nur noch \chord{A}Feuerwasser Branntewein nur noch \\
\chord{D}Schnaps:/
\end{verse}
\begin{verse}