]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
Split WWW target in two stages WWW-1 and WWW-2
[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.46"
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 % The good way adapted from David Bobroff
25
26 % macro for beamed two per two in 2/2 and 4/4 time signature
27 qBeam = {
28   #(override-auto-beam-setting '(end 1 8 * *) 1 4 'Staff)
29   #(override-auto-beam-setting '(end 1 8 * *) 2 4 'Staff)
30   #(override-auto-beam-setting '(end 1 8 * *) 3 4 'Staff)
31 }
32
33 \score {
34   <<
35     \new Staff \relative c'' {
36       \time 4/4
37       g8^\markup { without the macro } g g g g g g g |
38       g8 g g g4 g8 g g |
39     }
40     %Use the macro
41     \new Staff \relative c'' {
42       \time 4/4
43       \qBeam
44       g8^\markup { with the macro } g g g g g g g |
45       g8 g g g4 g8 g g |
46     }
47   >>
48   \layout {
49     \context {
50       \Staff
51       \override TimeSignature #'style = #'()
52     }
53   }
54 }