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,18 +7,18 @@
}
\begin{verse}
\chord{a}Banner, Zelte, "Wer da?" \chord{F}Rufe, Stille um das L \chord{G}ager her, \\
Feuer scheinen \chord{a}in der Nacht. \chord{E} Im \chord{C}Mantel schläft die Wache \chord{G}ein, \\
ein Leutnant schritt vor \chord{a}bei, das Würfelspiel ist f \chord{E}alsch. \\
Aus \chord{C}einem Schatten tritt her \chord{G}bei ein Spielmann in den K \chord{a}reis, \\
der Posten lässt vor \chord{E}bei und flüstert l \chord{a}eis: \\
\chord{a}Banner, Zelte, "Wer da?" \chord{F}Rufe, Stille um das \chord{G}Lager her, \\
Feuer scheinen \chord{a}in der Nacht. \chord{E}Im \chord{C}Mantel schläft die Wache \chord{G}ein, \\
ein Leutnant schritt \chord{a}vorbei, das Würfelspiel ist \chord{E}falsch. \\
Aus \chord{C}einem Schatten tritt \chord{G}herbei ein Spielmann in den \chord{a}Kreis, \\
der Posten lässt \chord{E}vorbei und flüstert \chord{a}leis: \\
\chord{a}Vagabund so hör` mich an: \\
Die N \chord{F}acht ist kurz und i \chord{F}rgendwann der R \chord{G}uf vom Kornett laut \\
ertönt, drum s \chord{a}piele mir das a \chord{E}ltgesung'ne Lied. \\
Und der S \chord{C}pielmann \chord{G}singt ein L \chord{a}ied: \\
Fünf Sc \chord{a}hwäne durch die Ödmark ziehn, ein K \chord{F}önig mit vier \\
Die \chord{F}Nacht ist kurz und \chord{F}irgendwann der \chord{G}Ruf vom Kornett laut \\
ertönt, drum \chord{a}spiele mir das \chord{E}altgesung'ne Lied. \\
Und der \chord{C}Spielmann \chord{G}singt ein \chord{a}Lied: \\
Fünf \chord{a}Schwäne durch die Ödmark ziehn, ein \chord{F}König mit vier \\
Recken hin, im \chord{G}Morgenrot ihr Banner fliegt, und \chord{a}weiter geht \\
es f \chord{E}ür das gute Ziel.
es \chord{E}für das gute Ziel.
\end{verse}
\begin{verse}