lilypond-user
[Top][All Lists]
Advanced

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

Re: Setting up custom scale and accidentals


From: Torsten Hämmerle
Subject: Re: Setting up custom scale and accidentals
Date: Tue, 1 May 2018 12:06:33 -0700 (MST)

Hi delboh,

Your custom accidental does not show up because it's not contained in the
current notation font (i.e. Emmentaler).
You can't access it in markup via \musicglyph "tsGlyph", so it won't be
printed in music.

*Solution:*
The standard stencil for accidentals (ly:accidental-interface::print) has to
be replaced by a custom stencil.

#(define (custom-accidental-stencil grob)
   (let ((alt (ly:grob-property grob 'alteration)))
     (if (equal? alt 1/12)
         (ly:stencil-scale tsGlyph 2.2 2.2)
         (ly:accidental-interface::print grob))))

This will just read the alt property, if it's 1/12, use your custom stencil
tsGlyph (scaled up a bit), in any other case it will call the standard
stencil.

After replacing the Accidental stencil by

\override Accidental.stencil = #custom-accidental-stencil

your custom stencil will show up:

<http://lilypond.1069038.n5.nabble.com/file/t3887/custom-accidental-stencil.png>
 

HTH,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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