lilypond-user
[Top][All Lists]
Advanced

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

Re: Overriding NoteHead stencil in a chord produces unwanted X offset


From: Neil Puttock
Subject: Re: Overriding NoteHead stencil in a chord produces unwanted X offset
Date: Tue, 7 Jul 2009 16:28:10 +0100

2009/7/4 Mark Polesky <address@hidden>:

> \relative  c' {
>  <c
>  \tweak #'duration-log #2 \tweak #'X-extent #'(0 . 1.65) cis'
>  g'>1
> }

Why not use an artificial harmonic instead?  They're automatically
centred on semibreves:

centreFill =
#(define-music-function (parser location note) (ly:music?)
   (if (eq? (ly:music-property note 'name) 'NoteEvent)
       (begin
         (set! (ly:music-property note 'articulations)
               (cons harmonic
                     (ly:music-property note 'articulations)))
         (set! (ly:music-property note 'tweaks)
               (acons 'stencil (lambda (grob) (grob-interpret-markup
                                               grob
                                               (make-musicglyph-markup
"noteheads.s2")))
                      (ly:music-property note 'tweaks)))))
   note)

\relative  c' { <c \centreFill cis' g'>1 }

Regards,
Neil




reply via email to

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