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

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

Re: Notation d'un barré pour une seule note ou accord


From: Pierre Perol-Schneider
Subject: Re: Notation d'un barré pour une seule note ou accord
Date: Fri, 23 Dec 2022 11:30:50 +0100

Bonjour Simon,


Le ven. 23 déc. 2022 à 10:13, Simon Martineau <martineau.simon@gmail.com> a écrit :
...
  • Première question justement : dans les solutions proposées par Pierre (cf code ci dessous), comment faire pour que la taille soit ajustée avec \magnifyStaff ? Pour l’instant le texte est bien ajusté mais pas la ligne du textSpan :
...
 
Oui, c'est assez agacent, je n'ai pas trouvé de solution simple.
Une solution un peu bâtarde serait d'ajouter un facteur 'scale' :

startB =
#(define-event-function (partial fretnum scale)
   ((string? "") number? number?)
    #{
      \tweak bound-details.left.text
        \markup
          \fontsize #-1 \normal-text \bold \concat {
          #(format #f "~@r" fretnum)
          #(if (not (string-null? partial))
             #{
             \markup {
             \lower #.3 \fontsize #-4.2 #partial
             \hspace #.1 }
             #}
             )
             \hspace #.1
        }
      \tweak style #'line
      \tweak thickness #1.8
      \tweak bound-details.left.stencil-align-dir-y #0
      \tweak bound-details.left.padding 0
      \tweak bound-details.left.attach-dir -1
      \tweak bound-details.left-broken.text ##f
      \tweak bound-details.left-broken.attach-dir -1
      \tweak bound-details.right.padding 0
      \tweak bound-details.right.attach-dir 1
      \tweak bound-details.right-broken.text ##f
      \tweak bound-details.right.text
        \markup
          %\with-dimensions #'(0 . 0) #'(-.3 . 0)
          %\draw-line #'(0 . -0.5)
          \stencil #(make-connected-path-stencil
                     '((0 -.5)) 0.15 1 scale #f #f)
      \startTextSpan
   #})

stopB = \stopTextSpan

\new Staff \with {
  \magnifyStaff 0.5
}
\relative c'' {
  g' \startB "3" 3 0.5 d bes \stopB
}

...
  • Deuxième question : toujours dans le code ci-dessus, j’aimerais que la propriété \tweak bound-details.left.stencil-align-dir-y #0 soit placée dans #(if (not (string-null? partial)) pour que la ligne soit à la bonne hauteur lorsque j’utilise l’indication de barré partiel mais aussi lorsque je ne l’utilise pas. Comment faire ? J’ai tenté d’insérer cette ligne au tout début de la fonction mais ça ne marche pas :
...
 Si c'est possible mais il faut réécrire tout le markup pour chaque option, pas seulement le tweak

HTH, cordialement,

Pierre


reply via email to

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