blob: 3f5afe40397385d7677b9c86146c1bbc1fcdc4a8 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
%% 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 {
= "rhythms, tweaks-and-overrides"
= "
In @qq{simple} lead-sheets, sometimes no actual notes are written,
instead only @qq{rhythmic patterns} and chords above the measures are
notated giving the structure of a song. Such a feature is for example
useful while creating/transcribing the structure of a song and also
when sharing lead sheets with guitarists or jazz musicians. The
standard support for this using @code{\\repeat percent} is unsuitable
here since the first beat has to be an ordinary note or rest. This
example shows two solutions to this problem, by redefining ordinary
rests to be printed as slashes. (If the duration of each beat is not a
quarter note, replace the @code{r4} in the definitions with a rest of
the appropriate duration).
"
= "Rhythmic slashes"
} % begin verbatim
% Macro to print single slash
rs = {
\once \override Rest.stencil = #ly:percent-repeat-item-interface::beat-slash
\once \override Rest.thickness = #0.48
\once \override Rest.slope = #1.7
r4
}
% Function to print a specified number of slashes
comp = #(define-music-function (parser location count) (integer?)
#{
\override Rest.stencil = #ly:percent-repeat-item-interface::beat-slash
\override Rest.thickness = #0.48
\override Rest.slope = #1.7
\repeat unfold $count { r4 }
\revert Rest.stencil
#}
)
\score {
\relative c' {
c4 d e f |
\rs \rs \rs \rs |
\comp #4 |
}
}
|