lilypond-user
[Top][All Lists]
Advanced

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

Re: Whole Measure Rests again -- how to draw ledger line?


From: Dmytro O. Redchuk
Subject: Re: Whole Measure Rests again -- how to draw ledger line?
Date: Mon, 5 Jan 2009 15:26:12 +0200

2009/1/5 Trevor Daniels <address@hidden>:
> Look
> in App B6 The Feta font and there you will find the symbols for a rest
> with a ledger line.  You will need a bit more Scheme to select the
> correct glyph though.
Thank you again!-)

Now i'm here (please, see below).

So:
1. i can improve this by checking Y offset and setting it to even
value, probably.
2. I am sorry! I should find the proper symbol by myself.
3. How this could be improved further?

\version "2.12.1"

posMMR =
#(define-music-function (parser location X Y)
  (number? number?)
  #{
    #(if (> (abs $Y) 4)
        (define restglyph "rests.0o")
        (define restglyph "rests.0"))
    #(ly:export (make-music
        'OverrideProperty
        'pop-first
        #t
        'grob-property-path
        (list (quote text))
        'grob-value
        (markup #:line (#:musicglyph restglyph))
        'once
        #t
        'symbol
        'MultiMeasureRest))
    \once \override MultiMeasureRest #'stencil = #ly:text-interface::print
    \once \override MultiMeasureRest #'X-offset = #$X
    \once \override MultiMeasureRest #'staff-position = #$Y
  #})

melody = {
  \time 6/4
  R1*6/4
  \time 7/4
  R1*7/4
  \time 8/4
  R1*8/4
  \time 9/4
  \posMMR #5.2 #2
  R1*9/4
  \time 10/4
  \posMMR #5.7 #6
  R1*10/4
  \time 11/4
  \posMMR #6.5 #2
  R1*11/4
}

\score {
  \new Staff {
    % \displayMusic \melody
    \melody
  }
  \layout {
    \context {
      \Staff
        \remove "Time_signature_engraver"
    }
  }
}


>
> Trevor

Thank you!

-- 
Dmytro O. Redchuk




reply via email to

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