bug-lilypond
[Top][All Lists]
Advanced

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

Re: Noteheads slightly too large


From: Pierre Perol-Schneider
Subject: Re: Noteheads slightly too large
Date: Tue, 9 Feb 2016 22:38:45 +0100

Send it again with something more homogeneous:

%%%%%%
\version "2.19.36"
#(set-global-staff-size 180)
#(set-default-paper-size "a4" 'landscape)

#(define (my-note-heads grob)
   (let* ((style (ly:grob-property grob 'style))
          (duration (ly:grob-property grob 'duration-log)))
            (case duration
               ((-1)
                (lambda (grob)
                        (ly:stencil-scale
                          (ly:note-head::print grob)
                          268/276  261/276)))
               ((0)
                (lambda (grob)
                        (ly:stencil-scale
                          (ly:note-head::print grob)
                          268/276  262/276)))
               ((1)
                (lambda (grob)
                        (ly:stencil-scale
                          (ly:note-head::print grob)
                          268/276  263/276)))
               ((2)
                (lambda (grob)
                        (ly:stencil-scale
                          (ly:note-head::print grob)
                          268/276  264/276)))
               (else (ly:note-head::print grob)))))

#(define (my-note-heads-new grob)
   (let* ((style (ly:grob-property grob 'style))
          (duration (ly:grob-property grob 'duration-log)))
;; "TODO: this means that 'my-note-heads-new
;; should apply only for the 'default style
;; does not work here though!
     ;(case style
       ;(('())
            (case duration
               ((-1)
                (grob-interpret-markup grob
                  #{
                    \markup {
                      \scale #'(268/276 . 261/276)
                      \musicglyph #"noteheads.sM1"
                    }
                  #}))
               ((0)
                (grob-interpret-markup grob
                  #{
                    \markup {
                      \scale #'(268/276 . 262/276)
                      \musicglyph #"noteheads.s0"
                    }
                  #}))
               ((1)
                (grob-interpret-markup grob
                  #{
                    \markup {
                      \scale #'(268/276 . 263/276)
                      \musicglyph #"noteheads.s1"
                    }
                  #}))
               ((2)
                (grob-interpret-markup grob
                  #{
                    \markup {
                      \scale #'(268/276 . 264/276)
                      \musicglyph #"noteheads.s2"
                    }
                  #}))
          ;((harmonic)
               ;   (grob-interpret-markup grob
               ;     #{
               ;      \markup {
               ;         \scale #'(0.98 . 0.94)
                ;        \musicglyph #"noteheads.s0harmonic"
               ;       }
                ;    #}))
               (else (ly:note-head::print grob)))))

%% Test 1:
\relative {
  %\override Staff.NoteHead.stencil = #my-note-heads
  \override Staff.NoteHead.stencil = #my-note-heads-new
  d'4 f2*1/2 a1*1/4 c\breve*1/8
%% Test 2:
  %d'4 f2*1/2\harmonic a1*1/4 c\breve*1/8
}
%%%%%%%%%

Cheers,
Pierre


reply via email to

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