Guitar barre (simple)
Appearance
Here is how to print bar chords (guitare barré)
The syntax is: note(or chord)\startB "fret_number" note(s)\stopB
\version "2.24.0"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%%%%%% Cut here ----- Start 'barChord.ly'
startB = #(define-event-function (txt1)(markup?)
#{
\tweak bound-details.left.text \markup\normal-text\tiny $txt1
\tweak dash-period 0.6 %\tweak style #'line
\tweak bound-details.left.stencil-align-dir-y #0
\tweak bound-details.left-broken.text ##f
\tweak bound-details.left-broken.attach-dir -1
\tweak bound-details.left-broken.padding 1.5
\tweak bound-details.right.padding -1.5 %pos x du trait vertical
\tweak bound-details.right.attach-dir 2
\tweak bound-details.right-broken.text ##f
\tweak bound-details.right.text
\markup
\with-dimensions #'(0 . 0) #'(-.3 . 0)
\draw-line #'(0 . -1)
\startTextSpan
#})
stopB=\stopTextSpan
%% %%%%%%% Cut here ----- End 'barChord.ly'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% syntax: note (or chord)\startB"fret_number" note(s) \stopB
\relative c' {
g4\startB "½BIII" d'8 g b d~d4 g2 c,2\stopB
}