On Tue 13 May 2025 at 11:34:14 (+0200), Silvain Dupertuis wrote:
> What about just placing it there, in front of the music within the final
> \score expression?
>
> \score {
> \new Staff \with {
> midiInstrument = "acoustic guitar (nylon)"
> } { \clef "treble_8"
> \transpose g e
> << \VoiceOne \\ \VoiceTwo \\ \VoiceThree \\ \VoiceFour \\ \SpacingVoice
> >>
> }
> \layout { }
> }
>
> Seems to work for me
Many ways will work … … until they don't. Add another staff,
and you've now got to add a \transpose to that one too.
> I put it on a separate line so as to be able to deactivate it with a leading
> % character
Ironically, the MWE made that very simple. Most of my \scores start
as below, which makes it easy to change the key.
\score {
\transpose f f
<< ← only needed with a piano reduction.
\new ChoirStaff <<
\new Staff <<
\clef treble \global
\new Voice { \soprano }
\addlyrics { \sopranotext }
>>
\new Staff <<
\clef treble \global
\new Voice { \alto }
\addlyrics { \altotext }
>>
…
>>
\new PianoStaff <<
\new Staff <<
\clef treble \global
\new Voice { \voiceOne \soprano }
\new Voice { \voiceTwo \alto }
>>
…
In case it's not obvious, I use \transpose f f rather than c c
in order to avoid having ' and , marks involved.
Cheers,
David.