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,11 +8,11 @@
}
\begin{verse}
Tr \chord{F}ommeln und Pfeifen mit h \chord{C}ellem Klang / z \chord{B}iehen da \\
den W \chord{C}eg entl \chord{C7}ang. / Nach M \chord{F}arignano z \chord{C}iehen sie, / ja \\
d \chord{F}ir \chord{C}i- \chord{F}di \chord{C}-r \chord{F}i-di-ri-di /:Trommelfelle beben in das \\
l \chord{C}ichte Morgenrot, / Pf \chord{d}eifen sind das L \chord{g}eben und die \\
Tr \chord{F}ommeln s \chord{C}ind der T \chord{F}od.:/
\chord{F}Trommeln und Pfeifen mit \chord{C}hellem Klang / \chord{B}ziehen da \\
den \chord{C}Weg \chord{C7}entlang. / Nach \chord{F}Marignano \chord{C}ziehen sie, / ja \\
\chord{F}diri-di-ri-di-ri-di /:Trommelfelle beben in das \\
\chord{C}lichte Morgenrot, / \chord{d}Pfeifen sind das \chord{g}Leben und die \\
\chord{F}Trommeln \chord{C}sind der \chord{F}Tod.:/
\end{verse}
\begin{verse}