]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/staff.itely
Doc: NR - using \unfoldRepeat with \addQuote
[lilypond.git] / 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.