|
From: | Lukas-Fabian Moser |
Subject: | Re: \omit-ing a specific type of Script [globally or via edition-engraver] |
Date: | Sun, 26 Dec 2021 17:13:06 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
Hi Kieren, Am 26.12.21 um 16:48 schrieb Kieren MacMillan:
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?
Perhaps something like: \version "2.22" omitScriptTypes = #(define-music-function (types) (list?) (let ((stencil (lambda (grob) (if (member (ly:event-property (ly:grob-property grob 'cause) 'articulation-type) types) #f ly:script-interface::print)))) #{ \override Script.stencil = #stencil #})) { \omitScriptTypes #'("fermata") a'2\fermata a\tenuto \omitScriptTypes #'("tenuto") a'\fermata a\tenuto \omitScriptTypes #'("fermata" "tenuto") a'\fermata a\tenuto \omitScriptTypes #'() a'\fermata a\tenuto }The more general syntax you suggested - making "Script" one of various possibilities - does not convince me, as the type of a script is in a special property ('articulation-type) that won't be of much use for other grob types, I expect.
Lukas
[Prev in Thread] | Current Thread | [Next in Thread] |