Inserting a \markup when using chordmode

Revision as of 18:53, 16 November 2025 by Jean Abou Samra (talk | contribs) (Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series)

A way to insert a \markup { . . . } string in \chords { . . . }.

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=309

% Note what happens if \hspace #-2 is deleted or set to +n.
% If "tacet" instead of "Tacet" a little bit of "C" peeks around the \whiteout.
CMString  = { <c e g>-\markup { \hspace #-2 \whiteout "Tacet" } }
CMStringX = #(append (sequential-music-to-chord-exceptions CMString #t)
           ignatzekExceptions)
<< { \chords { c1
   \set   chordNameExceptions = #CMStringX c
   \unset chordNameExceptions c }
 }
 { \relative c'' { c c c } 
 } 
>>