lilypond-user
[Top][All Lists]
Advanced

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

Current octave in relative mode


From: Klaus Blum
Subject: Current octave in relative mode
Date: Fri, 15 May 2020 12:01:06 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

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]