lilypond-user
[Top][All Lists]
Advanced

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

Re: Nested transposition


From: Flaming Hakama by Elaine
Subject: Re: Nested transposition
Date: Fri, 12 Mar 2021 16:30:07 -0800

It seems we can't be too pedantic here.

Based on the OP's situation,
one can imaging that the original piece might have looked like:

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

Then the attempt to transpose down a 3rd:

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


Then--and here is the crucial part--they decided to break up the original \relative into two expressions, so they could transpose one of them enharmonically.  

Before applying the enharmonic transposition,
here is what the new structure would look like:

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

Note that the inner { } is treated as a continuation of the first relative _expression_.  This can be seen in two ways:  the first { cs, } is in the octave of middle C and not two octaves below, which is what \fixed { cs, } would be.  Likewise, the ds is a step above cs, not a 7th below.

However, this is lazy, since it is not explicitly saying the inner { } is relative, it is relying on the fact that it is nested in a relative _expression_.

So, you run into problems when you add the \transpose before it, or do any number of other things with it, like cut & paste into other expressions, or call other functions with it as an argument.  

The \transpose function now views the { } _expression_ as fixed, and it is no longer relative to the context of the containing \relative { }


The non-lazy approach would be to supply the \relative when breaking up this _expression_.

We can debate about whether using the default \relative { } versus
\relative c { } is better, but that is besides the point.

The main point is that you need to start a new \relative _expression_, and when you do so, you need to specify the octave of the first note again, since it is no longer relative to the previous note.

So, for breaking up the first _expression_ into two, you would want either of these:

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

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


That is all that is needed, to be able to add \tranpsose and have it work properly.  The transposition works as intended, once you make sure the notes you are transposing are defined correctly.

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


The core issue here is that a relative _expression_ was broken up lazily.  Then when used as the argument to \transpose, it was silently and inadvertently cast to a fixed _expression_.

The key takeaway is to be explicit when breaking up relative expressions.

I don't think there is anything wrong with \transpose.


Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
elaine@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



reply via email to

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