lilypond-user-fr
[Top][All Lists]
Advanced

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

Re: Liaisons entre parenthèses


From: Seventies
Subject: Re: Liaisons entre parenthèses
Date: Mon, 17 Feb 2014 07:14:23 -0800 (PST)

Je n'ai pas trouvé les liaisons entre parenthèses, et je suis d'ailleurs
intéressé par ce sujet.

Il est par contre possible de mettre des soufflets entre parenthèses. Le
code doit rester valable pour créer l'objet. Par contre, je ne sais rien de
l'utilisation.

Donc, début de réponse, j'ignore comment l'adapter
[img]http://emoticon.gregland.net/emoticon/Confus/Confus_60.gif[/img] 


% Mettre un soufflet entre parenthèses (ou tout autre signe)

hairpinBetweenText =
#(define-music-function (parser location leftText rightText) (markup?
markup?)
   #{
     \once \override Hairpin #'stencil =
     #(lambda (grob)
        (let* ((orig (ly:grob-original grob))
               (siblings (if (ly:grob? orig)
                             (ly:spanner-broken-into orig)
                             '()))
               (hairpin-stencil (ly:stencil-aligned-to
                                 (ly:hairpin::print grob) Y CENTER))
               (left-addition (ly:stencil-aligned-to
                               (grob-interpret-markup grob leftText) Y
CENTER))
               (right-addition (ly:stencil-aligned-to
                                (grob-interpret-markup grob rightText) Y
CENTER)))
          (if (or (null? siblings)
                  (eq? grob (car siblings)))
              (set! hairpin-stencil
                    (ly:stencil-combine-at-edge
                     left-addition
                     X RIGHT
                     hairpin-stencil
                     0)))
          (if (or (null? siblings)
                  (eq? grob (car (reverse siblings))))
              (set! hairpin-stencil
                    (ly:stencil-combine-at-edge
                     hairpin-stencil
                     X RIGHT
                     right-addition
                     0.6)))
          hairpin-stencil))
   #})

% utilisation :
% parenthesizedHairpin = \hairpinBetweenText \markup "(" \markup ")"
% \parenthesizedHairpin
% c16\< d e f g a b c d e f g a\!




--
View this message in context: 
http://lilypond-french-users.1298960.n2.nabble.com/Liaisons-entre-parentheses-tp7580957p7580958.html
Sent from the LilyPond French Users mailing list archive at Nabble.com.



reply via email to

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