lilypond-user
[Top][All Lists]
Advanced

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

Re: add-grace-properties in TabVoice context


From: Marc Hohl
Subject: Re: add-grace-properties in TabVoice context
Date: Thu, 09 Jul 2009 10:14:21 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Neil Puttock schrieb:
[...]

I'd suggest making this part of the default grace settings by adding
the override directly to graceSettings and make-voice-props-set.

Hello Neil,

I have changed your improved parentheses handler to get the font-size
for the parentheses from the TabNoteHead, so parentheses around
grace notes are scaled properly in tablature.

(define-public (parentheses-item::calc-tabstaff-parenthesis-stencils grob)
  ;; the grob we want to parenthesize
  (let ((victim (ly:grob-array-ref (ly:grob-object grob 'elements) 0)))
    ;; check whether it's a notehead
    (if (grob::has-interface victim 'note-head-interface)
        (begin
          ;; tweak appearance before retrieving
          ;; list of stencils '(left-paren right-paren)
          ;; get the font-size from victim (=TabNoteHead) to handle
          ;; grace notes properly
          (ly:grob-set-property! grob 'font-size
(ly:grob-property victim 'font-size)) ;; <- was a hard-coded value of -2
          (ly:grob-set-property! grob 'padding 0)
          ;; apply whiteout to each element of the list
          (map stencil-whiteout
               (parentheses-item::calc-parenthesis-stencils grob)))
        (parentheses-item::calc-parenthesis-stencils grob))))

Marc
Regards,
Neil






reply via email to

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