]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/rhythms/rhythmic-slashes.ly
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into kainhofer
[lilypond.git] / input / lsr / rhythms / rhythmic-slashes.ly
1 %%  Do not edit this file; it is auto-generated from LSR!
2 \version "2.11.35"
3
4 \header { texidoc = "
5 In \"simple\" lead-sheets, sometimes no actual notes are written,
6 instead only \"rhythmic patterns\" and chords above the measures are
7 noted giving the structure of a song.  Such a feature is for example
8 useful while creating/transcribing the structure of a song and also
9 when sharing lead sheets with guitarists or jazz musicians.
10
11 The standard support for this is described in section \"Measure
12 repeats\", but  then the first beat has to be an ordinary note or rest. 
13
14 This example shows two solutions to this problem, by redefining
15 ordinary rests to be printed as slashes. (If the duration of each beat
16 is not a quarter note, replace the r4 in the definitions by a rest of
17 the appropriate duration).
18 " }
19
20 % Macro to print single slash
21 rs = {
22 \once \override Rest #'stencil = #ly:percent-repeat-item-interface::beat-slash
23 \once \override Rest #'thickness = #'0.48
24 \once \override Rest #'slope = #'1.7
25 r4
26 }
27
28
29 % Function to print a specified number of slashes
30 comp = #(define-music-function (parser location count) ( integer?)
31 #{
32 \override Rest #'stencil = #ly:percent-repeat-item-interface::beat-slash
33 \override Rest #'thickness = #'0.48
34 \override Rest #'slope = #'1.7
35 \repeat unfold $count { r4 }
36 \revert Rest #'stencil
37 #})
38
39 \score{
40 \relative c'{
41  c d e f | \rs \rs \rs \rs | \comp #4 |
42 }
43 }