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

@@ -5,16 +5,16 @@
}
\begin{verse}
D \chord{d}ieses kleine Winzorchester gönnt euch Ruhe etwas \\
später \chord{g}also, Geiger, f \chord{A}röhlich soll es s \chord{d}ein. \chord{g}Hej, \chord{A}he \chord{d}j! Leute,
\chord{d}Dieses kleine Winzorchester gönnt euch Ruhe etwas \\
später \chord{g}also, Geiger, \chord{A}fröhlich soll es \chord{d}sein. \chord{g}Hej, \chord{d}hej! Leute,
\end{verse}
\begin{verse}
macht nun Platz zum Tanzen, Musikanten, quält die \\
Tasten, si \chord{g}ngt für eure \chord{A}Gäste, haut mal r \chord{d}ein! \chord{F}Draußen, \\
da du \chord{C}nkelts lange sc \chord{F}hon, o \chord{A}j, \chord{d} nach Hause will noch \\
keiner ge \chord{F}hn, a \chord{C}ch \chord{F}! Ein leeres W \chord{C}einfass ist der L \chord{F}ohn, \\
\chord{A}oj \chord{g}, irgendeiner w \chord{d}ird nach N \chord{A}euem seh \chord{d}n. Und jetzt
Tasten, \chord{g}singt für eure \chord{A}Gäste, haut mal \chord{d}rein! \chord{F}Draußen, \\
da \chord{C}dunkelts lange \chord{F}schon, \chord{A}oj, \chord{d}nach Hause will noch \\
keiner \chord{F}gehn, \chord{F}ach! Ein leeres \chord{C}Weinfass ist der \chord{F}Lohn, \\
\chord{g}oj, irgendeiner \chord{d}wird nach \chord{A}Neuem \chord{d}sehn. Und jetzt
\end{verse}
\begin{verse}
@@ -23,10 +23,10 @@ kommts:
\begin{verse}
Ref: \\
\chord{d}Hochzeit, Hochzeit, im L \chord{C}eben nur ein \chord{F}mal! \\
\chord{g}Manche machens öft \chord{a}er, doch i \chord{A}st das nicht \chord{d}normal. \\
Und nochmal: H \chord{d}ochzeit, Hochzeit, im Le \chord{C}ben nur einm \chord{F}al! \\
M \chord{g}anche machens öft \chord{d}er, doch i \chord{A}st das nicht \chord{d}normal.
\chord{d}Hochzeit, Hochzeit, im \chord{C}Leben nur \chord{F}einmal! \\
\chord{g}Manche machens \chord{a}öfter, doch \chord{A}ist das nicht \chord{d}normal. \\
Und nochmal: \chord{d}Hochzeit, Hochzeit, im \chord{C}Leben nur \chord{F}einmal! \\
\chord{g}Manche machens \chord{d}öfter, doch \chord{A}ist das nicht \chord{d}normal.
\end{verse}
\begin{verse}