|
From: | Flaming Hakama by Elaine |
Subject: | Re: Current octave in relative mode |
Date: | Sat, 16 May 2020 09:22:18 -0700 |
Flaming Hakama by Elaine <address@hidden> writes:
>> From: Klaus Blum <address@hidden>
>> To: "address@hidden" <address@hidden>
>> Cc:
>> Bcc:
>> Date: Fri, 15 May 2020 12:01:06 +0200
>> Subject: Current octave in relative mode
>> Hi,
>>
>> I have a function that uses a music _expression_ twice.
>> My problem is:
>> In relative mode, this _expression_ can lead into a different octave. Then
>> the second application of the music _expression_ starts from that new octave.
>> (See the last two invocations of "\highlight" in the example below)
>>
>>
>> % ----------------------------------------
>> highlight =
>> #(define-music-function (mus)
>> (ly:music?)
>> #{
>> <<
>> $mus
>> \makeClusters $mus
>> >>
>> #})
>>
>> \new Staff {
>> \highlight { c'8 d' e' f' g' a' b' c'' }
>> \relative c' {
>> c1 \highlight { c8 d e f g f e d }
>> c1 \highlight { c8 d e f g a b c }
>> c1 \highlight { f,4 e d c }
>> c1
>> }
>> }
>> % ----------------------------------------
> I'm not quite sure what you are after here, except that some things are not
> in the octave you want, but I'm not sure which.
>
[...]
> So, in your example, if all the c1's are supposed to be the same octave
> this is accomplished by just specifying each of the ones you pass to your
> function.
>
>
> \version "2.19.81"
> % ----------------------------------------
> highlight =
> #(define-music-function (mus)
> (ly:music?)
> (make-relative (mus) mus
> #{
> <<
> $mus
> \makeClusters $mus
> >>
> #}))
You are aware that make-relative here fixes the problem? Did you just
copy the fixed version by accident from my reply?
--
David Kastrup
[Prev in Thread] | Current Thread | [Next in Thread] |