]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/automatically-change-durations.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / automatically-change-durations.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "rhythms"
11
12   texidoc = "
13 @code{shiftDurations} can be used to change the note lengths of a piece
14 of music. It takes two arguments - the scaling factor as a power of
15 two, and the number of dots to be added as a positive integer.
16
17 "
18   doctitle = "Automatically change durations"
19 } % begin verbatim
20
21 \paper { indent = 0 }
22
23 music = \relative c'' { a1 b2 c4 d8 r }
24
25 \score {
26   \new Voice {
27     \time 4/2
28     \music
29     \time 4/4
30     \shiftDurations #1 #0 { \music }
31     \time 2/4
32     \shiftDurations #2 #0 { \music }
33     \time 4/1
34     \shiftDurations #-1 #0 { \music }
35     \time 8/1
36     \shiftDurations #-2 #0 { \music }
37     \time 6/2
38     \shiftDurations #0 #1 { \music }
39     \time 7/2
40     \shiftDurations #0 #2 { \music }
41   }
42 }