lilypond-user
[Top][All Lists]
Advanced

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

Re: Macro or abbreviation


From: Jacques Menu
Subject: Re: Macro or abbreviation
Date: Sun, 9 Aug 2015 11:26:31 +0200

Hello Andrew,

You can get inspiration from the following.

JM


%1
Uncomment the second line to let LP do the line breaking by itself. The first definition is useful to keep line breaks as in the original score, useful to control your work:

myBreak = {\break}
%myBreak = {}


%2
I use such variables for custom fingerings for the bass guitar, including the caret to simplify the typing:

UN_B     = ^\tweak self-alignment-X #CENTER -\markup\large\bold\with-color #magenta "1B"
UN_B_PAR = ^\tweak self-alignment-X #CENTER -\markup\large\bold\with-color #magenta "(1B)"

{ \clef "bass" c \UN_B_PAR }


Le 9 août 2015 à 10:52, Andrew Bernard <address@hidden> a écrit :

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



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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