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