Frederic, Maybe have a look at autotranspose from OpenLilyLib: https://github.com/openlilylib/oll-misc/tree/master/pitch. You may find it more intuitive.
Saul Saul On Sat, Jan 4, 2025, 10:58 AM David Kastrup <d...@gnu.org> wrote: > Frédéric <ufosp...@gmail.com> writes: > > > I have some music written for instruments in ut. So I write > > \transposition c' in the source code. > > When I use \transpose to adapt the music to a clarinet, \cueDuring do > > not transpose the cue notes. > > > > In the example below, > > - the violin gets the cue notes in ut which is good > > - ClarinetI has the notes written 1 tone up so that the clarinet > > sounds the same as the singer but the cue notes are still written in > > ut when it should be 1 tone up > > - ClarinetII has everything written for clarinet (1 tone up) but that > > required to writte \transposition bf in the music in ut (before > > applying \transpose) which looks strange to me. > > > > So I have the impression that there is a bug, i.e. that \transposition > > should be changed when \transpose is applied. > > > > Thanks, > > > > F > > > > \version "2.25.20" > > > > \language "english" > > > > Singer = \relative { > > \transposition c' > > c' d e f g a b c > > } > > > > \addQuote "Singer" \Singer > > > > Violin = \relative { > > \transposition c' > > c'' d e f \cueDuring "Singer" #DOWN { g a b c } > > } > > > > ClarinetI = \transpose c d \Violin > > > > ClarinetII = \transpose c d \relative { > > \transposition bf > > c'' d e f \cueDuring "Singer" #DOWN { g a b c } > > } > > > > \score { > > \new Score << > > \new Staff \with { instrumentName = "Singer" } << \Singer >> > > \new Staff \with { instrumentName = "Violin" } << \Violin >> > > \new Staff \with { instrumentName = "ClarinetI" } << \ClarinetI >> > > \new Staff \with { instrumentName = "ClarinetII" } << \ClarinetII >> > > >> > > } > > I think you are mistaken. The purpose of \transposition is to change > the relation between written and sounding notes; the purpose of > \transpose is to change the written notes. Those purposes are > orthogonal. > > When you are writing notes to be used by instruments in different > transposition, it is a bad idea to put a \transposition in the notes. > That pins down the relation between written and sounding notes, and you > don't want that. > > You can create MIDI to hear what LilyPond's idea of sounding notes is: > the cue notes are engraved by looking at both the transposition of the > current staff as well as that of the quoted staff. For this to work > sensibly, the \transposition has to appear in the staff of the > instrument actually playing at a different concert pitch, not anywhere > else. > > -- > David Kastrup > >