Jump to content

Chord name exceptions: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
Line 1: Line 1:
The property <code>chordNameExceptions</code> can be used to store a list of special notations for specific chords.
The property <code>chordNameExceptions</code> can be used to store a list of special notations for specific chords.


<lilypond version="2.24.0">
<lilypond version="2.24">
% modify maj9 and 6(add9)
% modify maj9 and 6(add9)
% Exception music is chords with markups
% Exception music is chords with markups

Revision as of 18:45, 16 November 2025

The property chordNameExceptions can be used to store a list of special notations for specific chords.

\version "2.24"

% modify maj9 and 6(add9)
% Exception music is chords with markups
chExceptionMusic = {
  <c e g b d'>1-\markup { \super "maj9" }
  <c e g a d'>1-\markup { \super "6(add9)" }
}

% Convert music to list and prepend to existing exceptions.
chExceptions = #(append
  (sequential-music-to-chord-exceptions chExceptionMusic #t)
  ignatzekExceptions)

theMusic = \chordmode {
  g1:maj9 g1:6.9
  \set chordNameExceptions = #chExceptions
  g1:maj9 g1:6.9
}

\layout {
  ragged-right = ##t 
}

<<
   \new ChordNames \theMusic
   \new Voice \theMusic
>>