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: Éditions IN NOMINE
Subject: Re: Liaisons entre parenthèses
Date: Tue, 18 Feb 2014 10:34:55 +0100
User-agent: Roundcube Webmail/1.0-rc

Bonjour !

Première approche bien bourrin : j'ai remplacé tous les hairpin par tie... à mon avis c'est une bonne piste à creuser : il faut maintenant rajouter une truc pour l'aligner verticalement.

JMarc

Le 17.2.2014 16:14, Seventies a écrit :
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.

_______________________________________________
liste de diffusion lilypond-user-fr
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr

--
Jean-Marc LEGRAND
Éditions IN NOMINE



reply via email to

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