]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
LSR: Update.
[lilypond.git] / input / lsr / automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
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.
3 \version "2.11.49"
4
5 \header {
6   lsrtags = "rhythms"
7
8   texidoc = "
9 In a simple time signature of 2/2 or 4/4, 8th notes are beamed by
10 default as two sets of four.
11
12 Using a macro which overrides the autobeaming behavior, this snippet
13 changes the beaming to quarter note beats. 
14
15 "
16   doctitle = "Automatic beams two per two in 4/4 or 2/2 time signature"
17 } % begin verbatim
18 % Automatic beams two per two in 4/4 or 2/2 time signature
19 %              _____
20 % Default     | | | |
21 %              _   _
22 % Required    | | | |
23
24 % macro for beamed two per two in 2/2 and 4/4 time signature
25 qBeam = {
26   #(override-auto-beam-setting '(end 1 8 * *) 1 4 'Staff)
27   #(override-auto-beam-setting '(end 1 8 * *) 2 4 'Staff)
28   #(override-auto-beam-setting '(end 1 8 * *) 3 4 'Staff)
29 }
30
31 \score {
32   <<
33     \new Staff \relative c'' {
34       \time 4/4
35       g8^\markup { without the macro } g g g g g g g
36       g8 g g g4 g8 g g
37     }
38     %Use the macro
39     \new Staff \relative c'' {
40       \time 4/4
41       \qBeam
42       g8^\markup { with the macro } g g g g g g g
43       g8 g g g4 g8 g g
44     }
45   >>
46   \layout {
47     \context {
48       \Staff
49       \override TimeSignature #'style = #'()
50     }
51   }
52 }