Generating custom flags: Difference between revisions
Import snippet from LSR |
mNo edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
The <code>stencil</code> property of the <code>Flag</code> grob can be set to a custom | The <code>stencil</code> property of the <code>Flag</code> grob can be set to a custom Scheme function to generate the glyph for the flag. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
#(define-public (weight-flag grob) | #(define-public (weight-flag grob) | ||
(let* ((stem-grob (ly:grob-parent grob X)) | (let* ((stem-grob (ly:grob-parent grob X)) | ||
| Line 37: | Line 37: | ||
{ | { | ||
\time 1/4 | \time 1/4 | ||
<>^"Normal flags" | |||
\snippetexamplenotes | \snippetexamplenotes | ||
<>_"Custom flag: inverted" | |||
\override Flag.stencil = #inverted-flag | \override Flag.stencil = #inverted-flag | ||
\snippetexamplenotes | \snippetexamplenotes | ||
<>^"Custom flag: weight" | |||
\override Flag.stencil = #weight-flag | \override Flag.stencil = #weight-flag | ||
\snippetexamplenotes | \snippetexamplenotes | ||
<>_"Revert to normal" | |||
\revert Flag.stencil | \revert Flag.stencil | ||
\snippetexamplenotes | \snippetexamplenotes | ||
| Line 56: | Line 56: | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Rhythms]] | [[Category:Rhythms]] | ||
[[Category:Scheme]] | |||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Snippet]] | |||