[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: slurs entre crochets
From: |
Éditions IN NOMINE |
Subject: |
Re: slurs entre crochets |
Date: |
Wed, 25 Mar 2015 09:12:27 +0100 |
Merci Jean-François pour cette réponse rapide !
J'ai trituré un peu le code, mais sans trop savoir ce que je faisais.
Résultat, j'obtiens, en remplaçant Hairpin par Slur (tu vois le niveau
du gars !), un joli objet bougeable lais non paramétrable. Il faudrait
qu'un crac trouve le moyen d'accrocher les crochets aux positions a et
b du Slur.
En attendant, je fais une manipe à la mano, bien bourrin :
bouge = #(define-music-function
(parser location a-b)
(pair?)
#{
\once \override Voice.TextScript.extra-offset = $a-b
#})
slur = #(define-music-function
(parser location a-b)
(pair?)
#{
\once \override Slur.positions = $a-b
#})
\score {
\relative c''{
\bouge #'(-0.5 . -1.5) \slur #'(3 . 5.5) c16^"[" (d e f g a \bouge
#'(0.8 . -1.5) b^"]") c d e f g a }}
Merci encore et à bientôt !
JMarc
Le Tue, 24 Mar 2015 11:40:37 -0700 (MST),
Seventies <address@hidden> a écrit :
> J'ai retrouvé ceci sur les soufflets entre parenthèses, entre
> crochets, ...
>
> % 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 ")"
> bracketedHairpin = \hairpinBetweenText \markup "[" \markup "]"
> shortenedHairpin = \hairpinBetweenText \markup " " \markup " "
>
> \parenthesizedHairpin
> c16\< d e f g a b c d e f g a\!
> % ne vaut que pour le soufflet suivant la note concernée
>
>
> Je n'ai pas encore essayé en remplaçant le stencil hairpin par slur,
> ça devrait fonctionner.
> Si j'ai un moment ce soir, je teste, car c'est parfois bien utile.
>
> Cordialement,
>
> Jean-François
>
>
>
>
> --
> View this message in context:
> http://lilypond-french-users.1298960.n2.nabble.com/slurs-entre-crochets-tp7582592p7582598.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