lilypond-user
[Top][All Lists]
Advanced

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

Re: \transposedQuoteDuring


From: Malte Meyn
Subject: Re: \transposedQuoteDuring
Date: Wed, 1 May 2019 16:13:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1



Am 01.05.19 um 15:53 schrieb Pierre-Luc Gauthier:
Hi there,

Is there a way to transpose a quotation, say, an octave higher ?


I used the following code some years ago. IIRC you can call \color-music-if-point-and-click f. e. in a \layout { \context { \Voice … } } block to get grey quotes.

\version "2.19.25"

#(define quote-color grey)

color-music-if-point-and-click =
#(define-music-function (music) (ly:music?)
   (if (ly:get-option 'point-and-click)
       #{
         \temporary \override NoteHead.color = #quote-color
         \temporary \override Rest.color = #quote-color
         \temporary \override MultiMeasureRest.color = #quote-color
         #music
         \revert NoteHead.color
         \revert Rest.color
         \revert MultiMeasureRest.color
       #}
       music))

ottavaQuoteDuring =
#(define-music-function (ottava what main-music) (integer? string? ly:music?)
   (let ((thequote (make-music 'QuoteMusic
                     'element main-music
                     'quoted-music-name what
                     'quoted-transposition (ly:make-pitch ottava 0 0))))
     (color-music-if-point-and-click thequote)))

quoteDuring = \ottavaQuoteDuring 0 \etc



reply via email to

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