X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fgenerating-custom-flags.ly;h=3ba7022e5bcdb3350c37188a80dbfb5a86a1298a;hb=121b05751a34e19400dfc5e380fed1d0bff5029e;hp=f7d7206504d41410e5055cfc118bd01897d0db27;hpb=f0fe9c843e926066299c1f9a33004649f42e1f24;p=lilypond.git diff --git a/Documentation/snippets/generating-custom-flags.ly b/Documentation/snippets/generating-custom-flags.ly index f7d7206504..3ba7022e5b 100644 --- a/Documentation/snippets/generating-custom-flags.ly +++ b/Documentation/snippets/generating-custom-flags.ly @@ -1,24 +1,22 @@ -% DO NOT EDIT this file manually; it is automatically -% generated from Documentation/snippets/new -% Make any changes in Documentation/snippets/new/ -% and then run scripts/auxiliar/makelsr.py -% -% This file is in the public domain. -%% Note: this file works from version 2.16.0 -\version "2.16.0" +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. +\version "2.18.0" \header { lsrtags = "rhythms, tweaks-and-overrides" texidoc = " -The @code{stencil} property of the Flag grob can be set to a custom scheme -function to generate the glyph for the flag. +The @code{stencil} property of the @code{Flag} grob can be set to a +custom scheme function to generate the glyph for the flag. " doctitle = "Generating custom flags" } % begin verbatim - #(define-public (weight-flag grob) (let* ((stem-grob (ly:grob-parent grob X)) (log (- (ly:grob-property stem-grob 'duration-log) 2)) @@ -47,23 +45,26 @@ function to generate the glyph for the flag. (rotated-flag (ly:stencil-rotate-absolute stencil 180 0 0))) (ly:stencil-translate rotated-flag (cons (- (/ stem-width 2)) 0)))) -snippetexamplenotes = { \autoBeamOff c'8 d'16 c'32 d'64 \acciaccatura {c'8} d'64 } +snippetexamplenotes = +{ + \autoBeamOff c'8 d'16 c'32 d'64 \acciaccatura {c'8} d'64 +} { - \override Score.RehearsalMark #'self-alignment-X = #LEFT + \override Score.RehearsalMark.self-alignment-X = #LEFT \time 1/4 \mark "Normal flags" \snippetexamplenotes \mark "Custom flag: inverted" - \override Flag #'stencil = #inverted-flag + \override Flag.stencil = #inverted-flag \snippetexamplenotes \mark "Custom flag: weight" - \override Flag #'stencil = #weight-flag + \override Flag.stencil = #weight-flag \snippetexamplenotes \mark "Revert to normal" - \revert Flag #'stencil + \revert Flag.stencil \snippetexamplenotes }