]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/new/non-default-tuplet-numbers.ly
Imported Upstream version 2.14.2
[lilypond.git] / Documentation / snippets / new / non-default-tuplet-numbers.ly
diff --git a/Documentation/snippets/new/non-default-tuplet-numbers.ly b/Documentation/snippets/new/non-default-tuplet-numbers.ly
new file mode 100644 (file)
index 0000000..1ea456d
--- /dev/null
@@ -0,0 +1,41 @@
+\version "2.14.0"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+LilyPond also provides formatting functions to print tuplet numbers different
+than the actual fraction, as well as to append a note value to the tuplet
+number or tuplet fraction.
+"
+  doctitle = "Non-default tuplet numbers"
+}
+
+\relative c'' {
+  \once \override TupletNumber #'text =
+    #(tuplet-number::non-default-tuplet-denominator-text 7)
+  \times 2/3  { c4. c4. c4. c4. }
+  \once \override TupletNumber #'text =
+    #(tuplet-number::non-default-tuplet-fraction-text 12 7)
+  \times 2/3  { c4. c4. c4. c4. }
+  \once \override TupletNumber #'text =
+    #(tuplet-number::append-note-wrapper
+      (tuplet-number::non-default-tuplet-fraction-text 12 7) "8")
+  \times 2/3  { c4. c4. c4. c4. }
+
+  \once \override TupletNumber #'text =
+    #(tuplet-number::append-note-wrapper
+      tuplet-number::calc-denominator-text "4")
+  \times 2/3  { c8 c8 c8 c8 c8 c8 }
+  \once \override TupletNumber #'text =
+    #(tuplet-number::append-note-wrapper
+      tuplet-number::calc-fraction-text "4")
+  \times 2/3  { c8 c8 c8 c8 c8 c8 }
+
+  \once \override TupletNumber #'text =
+    #(tuplet-number::fraction-with-notes "4." "8")
+  \times 2/3  { c4. c4. c4. c4. }
+  \once \override TupletNumber #'text =
+    #(tuplet-number::non-default-fraction-with-notes 12 "8" 4 "4")
+  \times 2/3  { c4. c4. c4. c4. }
+}