lilypond-auto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lilypond-auto] Issue 3056 in lilypond: Barring example in Notation


From: lilypond
Subject: Re: [Lilypond-auto] Issue 3056 in lilypond: Barring example in Notation Reference
Date: Fri, 28 Dec 2012 02:52:36 +0000


Comment #12 on issue 3056 by address@hidden: Barring example in Notation Reference
http://code.google.com/p/lilypond/issues/detail?id=3056

Ok, I got a bit further. With the code below I can get the string number
spanner above using ^ or nothing and below using _, but I don't get the
right hand text drawn at the RH end of the spanner. I also tried to create
the RH text with the line I've commented out below, using the updown
function again, but that returns an error. How can I get one of those two
variations to work successfully?

#(define (updown grob)
  (let ((dirn (ly:event-property (event-cause grob) 'direction)))
    (if (eq? -1 dirn)
      DOWN
      UP)))

#(define (righttext grob)
  (let ((dirn (ly:event-property (event-cause grob) 'direction)))
    (if (eq? -1 dirn)
      (markup (#:draw-line (cons 0 0.5)))
      (markup (#:draw-line (cons 0 -0.5))))))

beginStringNum = #(define-event-function (parser location strng)
  (number?)
  #{
    \tweak bound-details.left.text \markup\bold\teeny\concat
      { \circle { \finger #(number->string strng) } \char ##x2006 }
    \tweak font-shape #'upright
    \tweak direction #updown
    \tweak bound-details.left.stencil-align-dir-y #CENTER
    \tweak dash-period #0.8
    \tweak dash-fraction #0.6
    \tweak thickness #0.8
    \tweak bound-details.right.text #righttext
%    \tweak bound-details.right.text \markup {
%      \draw-line #(cons 0 (/ updown -2)) }
    \tweak bound-details.left.padding #0.25
    \tweak bound-details.right.padding #-1
    \tweak bound-details.right-broken.padding #0.5
    \tweak bound-details.left-broken.padding #2
    \tweak bound-details.left-broken.text ##f
    \tweak bound-details.right-broken.text ##f
    \startTextSpan
  #}
)
endStringNum = \stopTextSpan

\relative c {
  \clef "treble_8"
  c4_\beginStringNum 5 c c \times 2/3 { c8 c c\endStringNum }
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]