lilypond-user
[Top][All Lists]
Advanced

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

Re: Nested transposition


From: David Kastrup
Subject: Re: Nested transposition
Date: Fri, 12 Mar 2021 21:17:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

David Wright <lilylis@lionunicorn.co.uk> writes:

> On Fri 12 Mar 2021 at 11:52:36 (+0000), Peter Toye wrote:
>> Thanks Christian. Not sure why that happens (bug?) but that works fine. 
>
> The problem (not a bug) is that you can't re-apply \relative
> processing to absolute pitches.
>
> \relative { … } applies the rules of relative pitch notation, an
> *input* method, to { … } and yields a CHUNK of absolute pitches.
>
> \transpose X Y { ••• } yields a CHUNK of transposed absolute pitches
> from already absolute pitches.
>
> \transpose X Y { ••• \relative { … } ••• } does both the above in turn,
> but working from the *inside*. So after the \relative is processed, all
> of { ••• [:CHUNK:] ••• } consists of absolute pitches to be transposed.
>
> \relative { … … [:CHUNK:] … … [:CHUNK:] … … } applies the rules of
> relative pitch notation to all the … pieces in *one* logical sequence,
> treating the pitches inside the CHUNKs as invisible because they,
> working from the inside, have each had their pitches frozen already
> by the same rules as above.
>
> Note particularly that any [:CHUNK:] could itself be a \relative { … },
> which is separately processed first. (It's recursive.)
>
> One good thing—you haven't used any floating pitches, as in
> tune = { c d e c d e f d }. That can complicate matters.

I've considered giving the result of \transpose a make-relative hook
that would work by first inverting the transposition, then applying
\relative, and then applying the transposition back again.  That would
require keeping score of what transposition has been applied.  And it
woul become a complete mess with nested transpositions, and possibly
even a \transpose command in between.

In the end, just letting \transpose produce absolute music that is
impervious to \relative seemed like the saner option.

-- 
David Kastrup



reply via email to

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