[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mettre un soufflet entre parenthèses
From: |
Seventies |
Subject: |
Re: Mettre un soufflet entre parenthèses |
Date: |
Mon, 17 Dec 2012 10:15:28 -0800 (PST) |
Voilà, en cherchant sur la toile, la même fonction, mais qui, elle, travaille
correctement :
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))
#})
Ne comprenant pas grand-chose au Scheme, je ne peux expliquer la différence,
et pourquoi le snippet de http://lsr.dsi.unimi.it ne fonctionne pas.
Un problème de version, peut-être ?
Et toutes mes excuses pour l'erreur de manipulation dans le message
original, c'était fort long - un mauvais copier/coller
Cordialement,
Jean-François
--
View this message in context:
http://lilypond-french-users.1298960.n2.nabble.com/Mettre-un-soufflet-entre-parentheses-tp7578858p7578864.html
Sent from the LilyPond French Users mailing list archive at Nabble.com.