lilypond-user
[Top][All Lists]
Advanced

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

whole page rotated


From: Karol Majewski
Subject: whole page rotated
Date: Tue, 04 Mar 2014 19:19:45 +0100

Hi,

In the following code, I want to rotate custom note head. To my suprise, this 
code makes the whole page rotated if there is a line break. What I'm I doing 
wrong?

#(define nhg
(lambda (grob)
  (if
    (= 2
      (ly:grob-property grob 'duration-log))
    (begin
      (let*
        ((stem
            (ly:grob-object grob 'stem))
          (stem-dir
            (ly:grob-property stem 'direction))
          (rot
            (if
              (= stem-dir 1) 0 180)))
        (ly:grob-set-property! grob 'stencil
          (grob-interpret-markup grob
            (markup #:rotate rot #:musicglyph "noteheads.u2doThin"))))))))

\layout {
  \context {
    \Staff
    \override NoteHead.stencil = #nhg
  }
}

{
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
  c''4 c''4 c''4 c''4
}






reply via email to

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