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

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

Re: Spanners (encore une question)


From: Martial R
Subject: Re: Spanners (encore une question)
Date: Thu, 9 Feb 2023 20:47:08 +0100

ha je n'avais  pas testé si after fonctionnait dans ce cas !

Merci

Le jeu. 9 févr. 2023 à 13:18, Jean Abou Samra <jean@abou-samra.fr> a écrit :

Le jeudi 09 février 2023 à 11:54 +0100, Martial R a écrit :

reBonjour,
Je ruserai  ainsi

<< {  
  { r1
    R1 \break c''4^\wahw r4 r2 r1 } } \ { s1 _\textSp"Solo break" s4 s4 s4 s4\stop }
 >>
%§-------------------------
stop = \stopTextSpan
txtSp = #(define-event-function (str)(markup?)
           #{
            \tweak bound-details.left.text \markup $str
           % \tweak bound-details.left.text \markup \normal-text $str
            \tweak style #'line % mettre en commentaire pour des pointillés
            \tweak dash-period #0.8
            \tweak bound-details.left.stencil-align-dir-y #0
            \tweak bound-details.left-broken.attach-dir -1 % pos y du trait
            \tweak bound-details.left-broken.padding 1.5
            \tweak bound-details.left-broken.text ##f
            \tweak bound-details.right.padding -2 %pos x du trait vertical
            \tweak bound-details.right-broken.text ##f
            \tweak bound-details.right.text
           \markup
           \with-dimensions #'(0 . 0) #'(-.3 . 0)
           \draw-line #'(0 . 1)
           \startTextSpan
       
           #})

<< {  
  { r1
    R1 \break c''4^\wahw r4 r2 r1 } }
 \
 { s1 _\txtSp"Solo break" s4 s4 s4 s4\stop }
 >>

Pour info, c'est un cas où on peut utiliser la fonction pratique \after (introduite en 2.23) pour éviter d'avoir à écrire explicitement une _expression_ parallèle.

\version "2.24.0"

{
  \once \override Score.SpacingSpanner.spacing-increment = 4
  \override TextSpanner.bound-details.left.text = "solo break"
  \textSpannerDown
  R1 \startTextSpan \after 2.. \stopTextSpan R1
  \bar ".."
}

(Notez que c'est comme un << >>, mais pas comme un << \\ >>, au sens où cela ne crée pas de nouvelle voix.)

La doc est ici : https://lilypond.org/doc/v2.24/Documentation/notation/expressive-marks-attached-to-notes

(Et en fait, il y a une page de bug ouverte sur le fait que l'on ne puisse pas faire \after 1 -- voir https://gitlab.com/lilypond/lilypond/-/issues/6232).

Cordialement,

Jean



--
Martial Rameaux


reply via email to

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