Écrire un crescendo en trois syllabes

Bonsoir à l'équipe,
Je cherche à écrire une nuance crescendo, mais étalée sur plusieurs mesures,
à la manière de
"c r e - - - - s c e n - - - d o", ajustée au nombre de mesures concernées.
La séparation en 2 syllabes ne pose pas trop de problème dans les snippets,
mais pour trois syllabes, ça semble nettement plus difficile à trouver.

Qui aurait une solution ?

Merci d'avance,
Jean-François

···

-----
Liste des partitions LilyPond en http://www.espace-midi.com/lilypond
--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/

Bonsoir Jean-François,

Andrew et Thomas ont proposé cette fonction TextSpannerWithCenteredText pour avoir un texte centré, il est peut-être possible de la compléter pour avoir un texte au début et à la fin comme dans :

{
  c'8
  -\tweak bound-details.left.text \markup { "début" }
  -\tweak bound-details.right.text \markup { "fin" }
  \startTextSpan
   [ _\< d'16 e' ] f'8 [ e' ] \! | % 4
  d'2 ~ _\> | % 5
  d’2
  \stopTextSpan
}

JM

%%%%%%%%%

\version "2.19.25"

% Annotation bracket with centred text.
% Andrew Bernard and Thomas Morley

TextSpannerWithCenteredText =
#(define-music-function (text) (string?)
   "Use TextSpanner semantics to create spanner brackets with centred text"
   #{
     \once \override TextSpanner.after-line-breaking =
     #(lambda (grob)
        (let* (
                ;; get stencil of grob
                (stil (ly:grob-property grob 'stencil))
                ;; get spanner length
                (spanner-len (interval-length (ly:stencil-extent stil X)))
                ;; make stencil from text arg
                (text-stil (grob-interpret-markup grob (markup text)))
                ;; get text length
                (text-len (interval-length (ly:stencil-extent text-stil X))))
          ;; if text length exceeds the spanner length we cannot really proceed.
          ;; do nothing - make an ordinary text spanner and warn.
          (if (>= text-len spanner-len)
              (begin
               (ly:warning "text length longer than spanner")
               #f
               )
              (let* (
                      ;; get direction, up or down
                      (dir (ly:grob-property grob 'direction))
                      ;; some padding
                      (padding 1)
                      ;; line thickness
                      (thickness 0.25)
                      ;; calculate length considering text length
                      (path-part-len (/ (- spanner-len text-len) 2))
                      ;; make left bracket stencil
                      (path-left-part-stil
                       (make-path-stencil
                        `(
                           moveto 0 ,(* -1 dir)
                           lineto 0 0
                           lineto ,path-part-len 0
                           )
                        thickness 1 1 #f))
                      ;; make right bracket stencil
                      (path-right-part-stil
                       (make-path-stencil
                        `(
                           moveto ,path-part-len ,(* -1 dir)
                           lineto ,path-part-len 0
                           lineto 0 0
                           )
                        thickness 1 1 #f))
                      ;; make complete stencil combining left and right parts
                      ;; and text
                      (full-stil
                       (stack-stencils X RIGHT padding
                         (list
                          path-left-part-stil
                          (centered-stencil text-stil)
                          path-right-part-stil)))
                      )
                ;; set grob stencil to fully constructed stencil
                (ly:grob-set-property! grob 'stencil full-stil)
                ))))
   #}
   )

{
  c' d' ees' fis'
  \once \override TextSpanner.direction = #DOWN

  \TextSpannerWithCenteredText "6\""
  g' \startTextSpan
  a' bes' c'' \stopTextSpan

  \TextSpannerWithCenteredText "x3"
  bes'\startTextSpan a' g' c' | r1 \stopTextSpan
}

%%%%%%%%%

···

Le 18 janv. 2021 à 18:21, Seventies <****@****> a écrit :

Bonsoir à l'équipe,
Je cherche à écrire une nuance crescendo, mais étalée sur plusieurs mesures,
à la manière de
"c r e - - - - s c e n - - - d o", ajustée au nombre de mesures concernées.
La séparation en 2 syllabes ne pose pas trop de problème dans les snippets,
mais pour trois syllabes, ça semble nettement plus difficile à trouver.

Qui aurait une solution ?

Merci d'avance,
Jean-François

-----
Liste des partitions LilyPond en LilyPond
--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/

Bonjour Jacques,
Cette solution paraît tout à fait satisfaisante. Je vais la tester cet
après-midi sur l'exemple minimum, puis essayer de l'appliquer au(x) cas
réel(s), ainsi qu'aux cas où le texte comprend des sauts de page

Il me semble que ce cas est assez fréquent, il mériterait peut-être un
développement "officiel" dans une prochaine version, idée à creuser. Mais ma
méconnaissance du Scheme ne me permet pas d'en faire plus.

Un tout grand merci,
Jean-François

···

-----
Liste des partitions LilyPond en http://www.espace-midi.com/lilypond
--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/

Petit bémol : cette fonction demande la version 2.19 ou 2.20, et ici je suis
toujours sous la 2.18 pour un travail commencé il y a de nombreux mois.
Sinon, en 2.20, fonctionnement correct de cette fonction, il reste à adapter
les textes en début et fin de spanner, et style de spanner.
Il reste à adapter mon travail précédent à la 2.20 (quelques débordements et
problèmes d'espacement dans les fonctions de texte, à réexaminer ...)

Cordialement,
Jean-François

···

-----
Liste des partitions LilyPond en http://www.espace-midi.com/lilypond
--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/