|
From: | Xavier Noria |
Subject: | Re: wrapping music |
Date: | Tue, 11 Mar 2014 15:08:47 +0100 |
Am 11.03.2014 14:57, schrieb Xavier Noria:Yes:
I am writing a score that has a few notes with cross heads. It would be
helpful to define \cross such that
\cross { c8 c8 c8 }
would expand to:
\override NoteHead.style = #'cross
c8 c8 c8
\revert NoteHead.style
Is that possible?
cross =
#(define-music-function (parser location music)(ly:music?)
#{
\temporary\override NoteHead.style = #'cross
$music
\revert NoteHead.style
#}
)
{
\cross { c8 c8 c8 }
}
(I don't know when (recently) the \temporary was included (I think somewhere in 2.17). This ensures that NoteHead.style won't be reverted to its _default_ value but to the value that was active _immediately before_.
HTH
Urs
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |