The following Scheme procedure works for
chord names.  It might work for other objects
which are printed with markup, but I haven't tried.

Paster the procedure at the head of your .ly file
and use the override before any chord to place
brackets round the name.

Trevor D

#(define (addBrackets grob)
  "Place brackets round a text object."
  (let* (
        ; Get current text
      (currentText (ly:grob-property grob 'text))
      (bracketedText (markup "(" currentText ")")))
    ; Store the bracketed text back
    (ly:grob-set-property! grob 'text bracketedText)
  )
  ; and print it
  (ly:text-interface::print grob))

music = {
  \chordmode {
    c1
    \once \override ChordNames.ChordName #'stencil =
#addBrackets
    f:sus4
    bes/f
  }
  <c e g>
  <f bes c'>
  \once \override ChordNames.ChordName #'stencil =
#addBrackets
  <f bes d'>
}

\score {
  <<
    \new ChordNames \music
    \new Voice \music
  >>
}

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:lilypond-user-bounces+t.daniels=treda.co.u
> [EMAIL PROTECTED] Behalf Of
> Hendrik Wouters
> Sent: 11 March 2008 08:43
> To: Lilypond User Mailing List
> Subject: chords names between round brackets
>
>
>
>
> Hi,
>
> It seems to be usual in jazz music that Chord
> Names are sometimes
> placed between round brackets.
> ex.
> (c:7) f:maj7
> or
> (g:m7 c:7) f:maj7
>
>
> Is there a way to put these brackets on the music sheet?
>
>
> thx in advance!
>
>
> _______________________________________________
> lilypond-user mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>



_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to