On Fri, Feb 22, 2013 at 7:29 AM, MING TSANG <tsan...@rogers.com> wrote:

> Hi, lily users,
>
> I have trouble displaying number 7 on a chord, but 9 is OK.  Please refer
> to .ly file
>
> I also don't know how to code these chord ( refer to .png : G(add2)
> G(sus4) & A(add9) )
>
>
LilyPond already supports sus4, although it's not in parentheses. The code
for entering it is "c:sus4".

To enter add2, add9, and other custom chords, use chord exceptions:

chExceptionMusic = {
  <c e g d'>1-\markup \super "(add9)"
  <c d e g>1-\markup \super "(add2)"
  <c f g>1-\markup \super "(sus4)"
}

chExceptions = #(append (sequential-music-to-chord-exceptions
chExceptionMusic #t) ignatzekExceptions)

\score {
  <<
    \new ChordNames \chordmode {
      c1 c1:3.5.9 c1:2.3.5 c1:sus4
    }
    \new Staff \relative c' {
      c1 c1 c1 c1
    }
  >>
  \layout {
    \context {
      \ChordNames
      chordNameExceptions = #chExceptions
    }
  }
}

Regards,
Nathan
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to