|
From: | Daniel Bernair (Belgacom.net) |
Subject: | \cresc entre parenthèses |
Date: | Sat, 7 Sep 2019 16:11:24 +0200 |
Bonjour à toutes et tous. Dans mes outils j’ai enregistrer cette fonction qui permet de mettre entre parenthèses un crescendo, decrescendo du style \< …\ ! ou \> …\ ! Cela fonctionne bien mais pas avec \cresc …\ ! ou \decr … \ ! Cela revient quelques fois dans ma partition Comment faire ? Voici le code de la fonction : 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)) #}) parenthesizedHairpin = \hairpinBetweenText \markup \fontsize #3 "( " \markup \fontsize #3 ")" %adapter fontsize en fonction des goûts \relative c''{ \once \override Hairpin.extra-offset = #'(-0.4 . 0) c1~\< c\! \once \override Hairpin.extra-offset = #'(0.5 . -1) \parenthesizedHairpin a1\> b c4 b c a a1\! %il est possible que le %0.5 puisse être inclus plus haut dans la définition \once \override Hairpin.extra-offset = #'(0.5 . -0) \parenthesizedHairpin c,1\< c d e\! } Merci de votre aide. Daniel Bernair This email has been scanned by BullGuard antivirus protection.
For more info visit www.bullguard.com
|
[Prev in Thread] | Current Thread | [Next in Thread] |