> Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye <[email protected]
> >:
>
> 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:[email protected] <[email protected]>
> www.ptoye.com
>

%{

The main issue here is that you are using \relative in a lax way.

Which is to say, in your example,
the overall expression uses relative,
but you don't specify an octave.

This means you are using the default.
Which may be fine, but it can help to be explicit,
and this also gives you a way to fix octaves quickly.

Next, the expression you are trying to transpose
is also not clearly defined what octave it is in.
You are relying on it matching the octave of the
previous expression.

Best practice for anything being sent to a function
is to define the octave of the music expression,
and likewise the duration of the first note.

So, this:

\relative {
c'4 d e f g a b c
    \transpose as bf
    {cs, ds es fs gs as bs cs}
}

Would be more carefully notated as:

\relative c' {
    c4 d e f g a b c
    \transpose as bf \relative c' {
        cs4 ds es fs gs as bs cs
    }
}

The problem goes away when you follow this practice.
This will also fix many other oddities when using \relative in other
contexts.

%}

\version "2.22.0"

\language "english"

\relative c' {
    c4 d e f g a b c
    \mark "original without transpose"
    {
        cs, ds es fs gs as bs cs
    }
}

\relative c' {
    c4 d e f g a b c
    \mark "best practice without transpose"
    \relative c' {
        cs4 ds es fs gs as bs cs4
    }
}


\relative c' {
    c4 d e f g a b c
    \mark "original, with tranpose"
    \transpose as bf {
        cs, ds es fs gs as bs cs
    }
}

\relative c' {
    c4 d e f g a b c
    \mark "best practice with transpose"
    \transpose as bf \relative c' {
        cs4 ds es fs gs as bs cs
    }
}


Elaine Alt
415 . 341 .4954                                           "*Confusion is
highly underrated*"
[email protected]
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to