]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: NR - using \unfoldRepeat with \addQuote
authorJames Lowe <pkx166h@gmail.com>
Thu, 23 Jul 2015 07:42:35 +0000 (08:42 +0100)
committerJames Lowe <pkx166h@gmail.com>
Mon, 27 Jul 2015 16:51:51 +0000 (17:51 +0100)
Issue 3515

Added example of how to
print \unfoldRepeats from
a music expression, when
using \addQuote.

Documentation/notation/staff.itely

index 17a60cbb2416adf3cbe24ac88fa306a15b1c27db..db5d5ebab8fe0508986554f4d553e4af4bdb0818 100644 (file)
@@ -1102,6 +1102,41 @@ oboeNotes = \relative {
 }
 @end lilypond
 
+If an @code{\unfoldRepeat} command in a music expression is required to
+be printed when using @code{\quoteDuring}, then it too must also contain
+its own @code{\unfoldRepeat} command;
+
+@lilypond[verbatim,quote]
+fluteNotes = \relative {
+  \repeat volta 2 { a'4 gis g gis }
+}
+
+oboeNotesDW = \relative {
+  \repeat volta 2 \quoteDuring #"incorrect" { s1 }
+}
+
+oboeNotesW = \relative {
+  \repeat volta 2 \quoteDuring #"correct" { s1 }
+}
+
+
+\addQuote "incorrect" { \fluteNotes }
+
+\addQuote "correct" { \unfoldRepeats \fluteNotes }
+
+\score {
+  \unfoldRepeats
+  <<
+    \new Staff \with { instrumentName = "Flute" }
+    \fluteNotes
+    \new Staff \with { instrumentName = "Oboe (incorrect)" }
+    \oboeNotesDW
+    \new Staff \with { instrumentName = "Oboe (correct)" }
+    \oboeNotesW
+  >>
+}
+@end lilypond
+
 The @code{\quoteDuring} command uses the @code{\transposition} settings
 of both quoted and quoting parts to produce notes for the quoting part
 that have the same sounding pitch as those in the quoted part.