lilypond-user
[Top][All Lists]
Advanced

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

Re: \transpose and quoted music


From: David Kastrup
Subject: Re: \transpose and quoted music
Date: Mon, 07 Aug 2017 15:41:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Jérôme Plût <address@hidden> writes:

> Let's say I am typesetting some orchestra music written for a horn in
> D and want to output it for some other, more reasonably-pitched
> instrument.
>
> I entered the music in this way:
>
> global = { \key d \minor }
> cues = \relative { c'4^"Cue" c c c } \addQuote "cues" \cues
> hornA = \transpose c d, \relative {
>   \cueDuring #"cues" #UP s1 c'4 c c c }
> % Both \cues and \hornA are consistently in concert pitch, which
> % is the most idiot-proof way of entering music. The \transpose command
> % is here to help entering the notes from the original source in D.
>
> \score { \transpose c' f << \global \hornA >> }

<< \global ... >> is a bad idea when ... may contain grace notes.  Just
a side remark.

> % I can also produce a score in concert pitch for the case where the
> % horn is replaced by a trombone in an emergency...
>
> Since \transpose has this strange behaviour that it does not touch
> quoted music (... but why?), 

The main idea is that quoted music is already in concert pitch (after
compensating for its own \transposition setting) and any changes you
want to get done from there should be based on the relation between the
resulting instrument (as indicated by its setting of \transposition) and
concert pitch.

> the resulting PDF has the horn notes in F, but the cues are still in
> concert pitch, which is less than fully helpful to the poor horn
> player.

So?  Tell LilyPond what you are doing.

global = { \key d \minor }
cues = \relative { c'4^"Cue" c c c } \addQuote "cues" \cues
hornA = \transpose c d, \relative {
  \cueDuring #"cues" #UP s1 c'4 c c c }
% Both \cues and \hornA are consistently in concert pitch, which
% is the most idiot-proof way of entering music. The \transpose command
% is here to help entering the notes from the original source in D.

\score { \transpose c' f { \global \transposition f \hornA } }
> I know one sure-proof way to solve this (by writing a custom
> \sanetranspose Scheme function that goes deep in the music and
> replaces all the \cueDuring by \transposedCueDuring etc.), but this is
> surely not the most elegant way. Is there a simple way to make
> \transpose behave reasonably?

Just make sure to keep LilyPond informed about the relation of music to
concert pitch.  That's what \transposition is for.

-- 
David Kastrup

reply via email to

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