Here is a proposal
(without language = "english" => I use is and es for sharp and flat)
(using variables and transpose once from c to c sharp and once from c to b flat)
and using relative c' to ensure proper treatment of octaves.
I do not know if it helps, but it work for me with your example :
\version "2.20.0"
musicA = {
\relative c' {
\clef treble
\key c \major
c'4 d e f g a b c
}
}
musicB = \relative c' {
\clef bass
\key c \major
c, d e f g a b c
}
musicAB = {
\musicA
\transpose a ais { \musicB }
}
musicAC = {
\musicA
\transpose c des { \musicB }
}
\markup { "from c to c sharp => a to a sharp (3 sharps to 10 sharps!)" }
\score {
{
\musicA
\musicB
\break
\musicAB
}
}
\markup { "from c to d double-flat => a to b flat (3 sharps to 2 [=12-10]
flats"}
\score {
{
\break
\transpose c a, { \musicAB }
\musicAC
\break
\transpose c a, { \musicAC }
}
}
Le 12.03.21 à 11:28, Peter Toye a écrit :
Nested transposition I am trying to engrave a transposed song. It's written without key
signature but is very tonal. It starts in C and ends in C#. I want to transpose it down
a minor third. The part in C is fine, but the part in C# ends up as A## and there are
far too many double-sharps for it to be performable.
I found the 'minimal accidental' snippet but that looks as if it messes up the tonality
- a mixture of A sharp and B flat.
I tried the code below, which get the note names right but the octaves go completely
wrong. Is this a bug? It would be a useful feature if it could be corrected.
\version "2.22.0"
\language "english"
{
\transpose c a,
\relative {
c'4 d e f g a b c
\transpose as bf
{cs, ds es fs gs as bs cs}
}
}
Regards,
Peter
mailto:lilyp...@ptoye.com <mailto:lilyp...@ptoye.com>
www.ptoye.com <http://www.ptoye.com>
--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>