]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/new/compound-time-signatures.ly
Imported Upstream version 2.14.2
[lilypond.git] / Documentation / snippets / new / compound-time-signatures.ly
diff --git a/Documentation/snippets/new/compound-time-signatures.ly b/Documentation/snippets/new/compound-time-signatures.ly
new file mode 100644 (file)
index 0000000..04dc1c2
--- /dev/null
@@ -0,0 +1,31 @@
+\version "2.14.0"
+
+\header {
+  lsrtags = "rhythms"
+  texidoc = "
+Odd 20th century time signatures (such as \"5/8\") can often be played
+as compound time signatures (e.g. \"3/8 + 2/8\"), which combine two or
+more inequal metrics. LilyPond can make such music quite easy to read
+and play, by explicitly printing the compound time signatures and
+adapting the automatic beaming behavior. (Graphic measure grouping
+indications can also be added; see the appropriate snippet in this
+database.)
+"
+  doctitle = "Compound time signatures"
+}
+
+#(define ((compound-time one two num) grob)
+   (grob-interpret-markup grob
+                          (markup #:override '(baseline-skip . 0) #:number
+                                  (#:line ((#:column (one num))
+                                           #:vcenter "+"
+                                           (#:column (two num)))))))
+
+\relative c' {
+  \override Staff.TimeSignature #'stencil = #(compound-time "2" "3" "8")
+  \time 5/8
+  \set Staff.beatStructure = #'(2 3)
+  c8 d e fis gis
+  c8 fis, gis e d
+  c8 d e4 gis8
+}