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: Simon Martineau
Subject: Re: Notation d'un barré pour une seule note ou accord
Date: Fri, 23 Dec 2022 10:13:24 +0100

Bonjour à tous,

Finalement je pense faire un petit mix des solutions proposées par Pierre (et des snippets sur LSR) et Martial. Merci à tous les deux ! J’ai encore besoin d’un peu d’aide, si quelqu’un a la solution :

singleB =
#(define-music-function (partial fretnum)
    ((string? "") number?)
  #{ 
    ^\markup {
    \center-align \fontsize #-1 \concat { 
        \bold { 
          $(format #f "~@r" fretnum) 
          #(if (not (string-null? partial))
             #{ \markup \lower #.3 \fontsize #-4.2 #partial #})
        } 
        "¬" 
      } 
    } 
    #})

\relative c'' {
  <bes d g>1 \singleB "3" 3
  % Ou
  <bes d g>1 \singleB 3
}

Je trouve la solution avec le caractère “¬” tout à fait convenable, et qui a aussi l’avantage d’être ajustée en cas d’utilisation de \magnifyStaff. J’essaye donc d’adapter un des snippets sur le LSR pour qu’il coincide.

startB = 
#(define-event-function (partial fretnum) 
   ((string? "") 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)
      \startTextSpan 
   #})

stopB = \stopTextSpan

\new Staff \with {
  \magnifyStaff 0.5
}
\relative c'' {
  g' \startB "3" 3 d bes \stopB
}
      (if (not (string-null? partial))
         #{ \tweak bound-details.left.stencil-align-dir-y #0 #}
         #{ \tweak bound-details.left.stencil-align-dir-y #-0.25 #}
       )

Merci beaucoup !

Bonne journée,

Simon


reply via email to

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