]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/new/quoting-another-voice-with-transposition.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / new / quoting-another-voice-with-transposition.ly
diff --git a/Documentation/snippets/new/quoting-another-voice-with-transposition.ly b/Documentation/snippets/new/quoting-another-voice-with-transposition.ly
new file mode 100644 (file)
index 0000000..5687876
--- /dev/null
@@ -0,0 +1,42 @@
+\version "2.19.56"
+
+\header {
+  lsrtags = "pitches, staff-notation"
+
+  texidoc = "
+Quotations take into account the transposition of both source and
+target.  In this example, all instruments play sounding middle C; the
+target is an instrument in F.  The target part may be transposed using
+@code{\\transpose}.  In this case, all the pitches (including the
+quoted ones) are transposed.
+
+"
+  doctitle = "Quoting another voice with transposition"
+} % begin verbatim
+
+\addQuote clarinet {
+  \transposition bes
+  \repeat unfold 8 { d'16 d' d'8 }
+}
+
+\addQuote sax {
+  \transposition es'
+  \repeat unfold 16 { a8 }
+}
+
+quoteTest = {
+  % french horn
+  \transposition f
+  g'4
+  << \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >>
+  << \quoteDuring #"sax" { \skip 4 } s4^"sax." >>
+  g'4
+}
+
+{
+  \new Staff \with {
+    instrumentName = \markup { \column { Horn "in F" } }
+  }
+  \quoteTest
+  \transpose c' d' << \quoteTest s4_"up a tone" >>
+}