[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Documentation fix] Quoted voices with tagged music expressions

From: Jan Hajic, jr.
Subject: [Documentation fix] Quoted voices with tagged music expressions
Date: Sat, 18 Jan 2014 17:58:27 +0100


the difference in processing of quotes and tags leads to unintuitive
behavior when quoting voices with tags. Specifically, this comes up in
exporting parts from a score: cues are for parts only and should not
be left in scores.

A minimal example is:


\version "2.18.0"

outputTypeTag = "isScore"

firstInstrument = \relative c' {
\tag #'isPart { \cueDuring #"quoteSecondInstrument" #UP { r2 } }
\tag #'isScore { r2 }
e4 f |
g4 a b c |

secondInstrument= \relative c'' {
c4 c r2 |
\cueDuring #"quoteFirstInstrument" #DOWN { r2 }
c4 c |

\addQuote quoteFirstInstrument \firstInstrument
\addQuote quoteSecondInstrument \secondInstrument

\new Staff <<
\keepWithTag \outputTypeTag \firstInstrument
\new Staff <<
\keepWithTag \outputTypeTag \secondInstrument


The cue voice in measure 2 of secondInstrument will display "e f"
instead of "g a". This is because when creating the quote in \addQuote
quoteFirstInstrument \firstInstrument, no tags
are applied, so instead of interpreting the first two measures of
firstInstrument as "alternate versions", it interprets them as
consecutive music, throwing the synchronization between the quote and
\secondInstrument by two measures. However, because the new Staff with
\firstInstrument is created with the tag, the synchronization of the
two voices stays correct -- only the cue notes are off.

The correct solution is to apply the tag when creating the quote:

\addQuote quoteFirstInstrument \keepWithTag \outputTypeTag \firstInstrument
\addQuote quoteSecondInstrument \keepWithTag \outputTypeTag \secondInstrument

Although perfectly logical, this behavior leads to a strange error in
the output. I believe this should be mentioned in the documentation.

Proposed amendments to the documentation:

section Known issues and warnings:

"The quoting voice and the quote created with the \addQuote command
should have the same tags applied to them (\addQuote qInstrument
\keepWithTag #'someTag \instrument). Synchronization problems may
result otherwise: if there are alternatives in the quoted voice that
are selected from by tags (for instance: cues when exporting parts),
they will be interpreted as consecutive music when LilyPond is
creating the quote."

section Known issues and warnings:

"Tags in voices that get quoted may cause hard-to-debug behavior. See
section Known issues and warnings."

I hope this report/suggestion is useful.

Have a nice Sunday!

--Jan Hajic

reply via email to

[Prev in Thread] Current Thread [Next in Thread]