Jump to content

Quoting another voice with transposition: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
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</code>. In this case, all the pitches (including the quoted ones) are transposed.
Quotations take into account the transposition of both source and target. In this example, all instruments play sounding middle&nbsp;c; the target is an instrument in&nbsp;f. The target part may be transposed using <code>\transpose</code>. In this case, all the pitches (including the quoted ones) are transposed.


<lilypond version="2.24">
<lilypond version="2.24">
Line 33: Line 33:
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 14:22, 29 November 2025

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 \transpose. In this case, all the pitches (including the quoted ones) are transposed.

\version "2.24"

\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" >>
}