[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Remove all occurrencies of "0" fingerings
From: |
Marc Hohl |
Subject: |
Remove all occurrencies of "0" fingerings |
Date: |
Tue, 8 Aug 2017 10:23:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Hello list!
I wanted to write a little callback to remove all occurrencies
of "0" fingerings. This is what I got so far:
\version "2.19.63"
music = {
c'4-3 d'-0 e'-2 f'-3 | g'1-0
}
\score {
\new Staff \with {
\override Fingering.stencil =
#(lambda (grob)
(let* ((text (ly:grob-property grob 'text))
(stencil (if (equal? text "0")
empty-stencil
(ly:grob-property grob 'stencil))))
stencil)) }
{ \music }
}
Compiling this nearly MWE, I get:
Warning: Fingering has empty extent and non-empty stencil.
Warning: Fingering has empty extent and non-empty stencil.
And *no* fingering at all is shown in the resulting score.
What am I doing wrong?
Regards,
Marc
- Remove all occurrencies of "0" fingerings,
Marc Hohl <=
Re: Remove all occurrencies of "0" fingerings, David Kastrup, 2017/08/08