2015-08-09 10:52 GMT+02:00 Andrew Bernard <andrew.bern...@gmail.com>: > Hello Ponderers, > > It seems the topic of macros and abbreviations in lilypond source comes up > from time to time and engenders all sorts of complex debate, so I am > slightly wary of asking this question. > > I need to say: > > \tweak Accidental.stencil ##f > > in a very large number of chords, and often several times in one chord in my > current large and complex score. The score is becoming cluttered with this > repeated command, and it’s quite a lot of typing when you have so many to > type. I naively tried to make this an event function, but that does not work > inside a chord. [As an aside, it’s not a matter of changing the accidental > style in use, dodecaphonic. I need to turn off selected accidentals in the > dodecaphonic style when I join notes using a custom grace note slur function > I have, that does not behave the same way as ‘proper’ slurs do.] > > Is there a way to make this into a macro, or abbreviate it in some way? I am > not referring to making a keystroke macro in Frescobaldi, but a language > level shorter form, for convenience. I hope this question does not trigger a > torrent of comments saying this is a Bad Thing (TM). > > Andrew
Hi Andrew, you post your request on the user-list, thus I assume you don't ask for extending the source code but for a custom solution. In 2.18.2 you can do omitAcc = #(define-music-function (parser location music) (ly:music?) #{ \tweak Accidental.stencil ##f $music #}) Thanks David Kastrup 2.19.24 allows for: omitAcc = \tweak Accidental.stencil ##f \etc { < \omitAcc cis' ces'' > } Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user