lilypond-user
[Top][All Lists]
Advanced

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

Re: \omit-ing a specific type of Script [globally or via edition-engrave


From: David Kastrup
Subject: Re: \omit-ing a specific type of Script [globally or via edition-engraver]
Date: Sun, 26 Dec 2021 17:17:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Kieren MacMillan <kieren@kierenmacmillan.info> writes:

> Hi all,
>
> Given
>
> \version "2.21"
> { \omit Script c''1^\fermata_\espressivo }
>
> obviously both Script grobs will be omitted; same, of course, with
>
> \version "2.21"
> \layout { \context { \Score \omit Script } }
> { c''1^\fermata_\espressivo }
>
> Is there a way (e.g., via callback or improved \omit function
> definition) to make \omit more surgical? For example, can one
> effectively say
>
>     \omit #'(fermata) Script
>
> so that only fermatas get omitted?
>
> Thanks,
> Kieren.

Sort of butt-ugly:

\version "2.21"
\layout {
  \context { \Score
             \override Script.stencil =
             #(grob-transformer 'stencil
                                (lambda (grob default)
                                  (and (not (string=?
                                             (ly:event-property (event-cause 
grob)'articulation-type)
                                             "fermata"))
                                       default)))
           }
}

{ c''1^\fermata_\espressivo }

-- 
David Kastrup

reply via email to

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