1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
6 lsrtags
= "rhythms, tweaks-and-overrides"
9 In \"simple\" lead-sheets, sometimes no actual notes are written,
10 instead only \"rhythmic patterns\" and chords above the measures are
11 notated giving the structure of a song. Such a feature is for example
12 useful while creating/transcribing the structure of a song and also
13 when sharing lead sheets with guitarists or jazz musicians. The
14 standard support for this using @code{\\repeat percent} is unsuitable
15 here since the first beat has to be an ordinary note or rest. This
16 example shows two solutions to this problem, by redefining ordinary
17 rests to be printed as slashes. (If the duration of each beat is not a
18 quarter note, replace the @code{r4} in the definitions with a rest of
19 the appropriate duration).
22 doctitle
= "Rhythmic slashes"
24 % Macro to print single slash
26 \once \override Rest
#'stencil
= #ly
:percent-repeat-item-interface
::beat-slash
27 \once \override Rest
#'thickness
= #'0.48
28 \once \override Rest
#'slope
= #'1.7
32 % Function to print a specified number of slashes
33 comp
= #(define-music-function
(parser location count
) ( integer?
)
35 \override Rest
#'stencil
= #ly
:percent-repeat-item-interface
::beat-slash
36 \override Rest
#'thickness
= #'0.48
37 \override Rest
#'slope
= #'1.7
38 \repeat unfold $count
{ r
4 }
39 \revert Rest
#'stencil