Am 09.02.2014 21:54, schrieb catal...@hotmail.com:
Hi list,

I have a cello score using 2 staves, the extra being used to display movements 
of the bow (sul tasto / sul ponticello), using glissandi (on a staff with a 
single line).
This extra staff has a special "clef" that looks like this:

SP
ST

How can I make this text behave like a clef, i.e. repeating at the beginning of 
every line ?
I searched how to define a new clef or how to make a \markup block behave like 
a clef, unsuccessfully.

See the attachment. You can play with the values for font-size and
baseline-skip yccording to your needs.

HTH,

Marc


\version "2.18.0"

#(add-new-clef "SPST" "markup.spst" 0 0 0)

#(define-markup-command (spstClef layout props) ()
  (interpret-markup layout props
                    (markup #:vcenter #:bold
                            #:override (cons 'font-family 'sans)
                            #:fontsize 1
                            #:override (cons 'baseline-skip 2)
                            #:left-align #:center-column ("SP" "ST"))))

#(define-public (clef::print-spst-if-set grob)
  (let ((glyph (ly:grob-property grob 'glyph)))

    (if (string=? glyph "markup.spst")
        (grob-interpret-markup grob (make-spstClef-markup))
        (ly:clef::print grob))))
        
\score {
   <<
     \new Staff {
        \clef "bass"
        s1
     }
     \new Staff \with {
       \override StaffSymbol.line-count = #1
       \override Clef.stencil = #clef::print-spst-if-set
     } {
       \clef "SPST"
       s1
     }
   >>
}

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

Reply via email to