lilypond-user
[Top][All Lists]
Advanced

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

Re: Current octave in relative mode


From: antlists
Subject: Re: Current octave in relative mode
Date: Fri, 15 May 2020 12:28:56 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

There's a function Han Wen wrote for me years ago, that's made its way in to standard lilypond. It's probably mentioned in the docu about relative mode. Something along the lines of

      c1  \highlight { c8 d e f g f e d }
      \setAbsoluteOctave ...
      c1  \highlight { c8 d e f g a b c }

Don't quote me on the function name though ... (I needed it for Pennsylvania 6-5-0-0-0

Cheers,
Wol

On 15/05/2020 11:01, Klaus Blum wrote:
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)

Is there something I can do INSIDE my function to prevent this? E.g.
storing and re-applying the current octave? Thanks for any hint.  :)


% ----------------------------------------
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
   }
}
% ----------------------------------------

Cheers,
Klaus




reply via email to

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