|
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 {
f "~@r" fretnum)
$(format #(if (not (string-null? partial))
# #{ \markup \lower #.3 \fontsize #-4.2 #partial #})
}
¬"
"}
}
#})
\relative c'' {
\singleB "3" 3
<bes d g>1 Ou
%\singleB 3
<bes d g>1 }
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.
\magnifyStaff
? Pour l’instant le texte est
bien ajusté mais pas la ligne du textSpan :
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
#})
\stopTextSpan
stopB =
\new Staff \with {
\magnifyStaff 0.5
}
\relative c'' {
\startB "3" 3 d bes \stopB
g' }
\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 :(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
[Prev in Thread] | Current Thread | [Next in Thread] |