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

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to