Finalement, ça fonctionne, l'erreur était due à une ligne de
commentaire qui était coupée en deux:
J'ai complété le code avec les cas de 3 accords ( que j'ai nommé
w faute de mieux) et de 4 accords (x):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.2"
\paper {
system-system-spacing.basic-distance = #20
}
gridPath =
\markup
\with-dimensions #'(0 . 0) #'(-4.3 . 2)
\path #0.1
#'((moveto 0 -15.1)
(rlineto 26.5 9.9)
)
coinPath =
\markup
\with-dimensions #'(0 . 0) #'(-4.3 . 2)
\path #0.1
#'((moveto 12.5 -10)
(rlineto 14.5 -5.1)
(moveto 12.5 -10)
(rlineto 14.4 4.8)
)
gridCoinPath =
\markup
\with-dimensions #'(0 . 0) #'(-4.3 . 2)
\path #0.1
#'((moveto 0 -15.1)
(lineto 26.5 -5.3)
(moveto 13.50 -10.0)
(lineto 26.5 -15.00)
)
croixPath =
\markup
\with-dimensions #'(0 . 0) #'(-4.3 . 2)
\path #0.1
#'((moveto 0 -15.1)
(lineto 26.5 -5.3)
(moveto 0 -5.3)
(lineto 26.5 -15.00)
)
%%%%%%%%%%%%%%%%%%%%%%%%%%
"\\/" = #(define-music-function
(parser location mus1 mus2)
( ly:music? ly:music? )
#{
\mark \markup { \gridPath }
\once \override ChordName.extra-offset = #'(1 . .5 )
$mus1
\once \override ChordName.extra-offset = #'(3 . -3 )
$mus2
#})
v = #(define-music-function
(parser location mus1 mus2 )
( ly:music? ly:music? )
#{
\mark \markup { \coinPath }
\once \override ChordName.extra-offset = #'(2 . -1 )
$mus1
\once \override ChordName.extra-offset = #'(-2 . -1 )
$mus2
#})
w = #(define-music-function
(parser location mus1 mus2 mus3 )
( ly:music? ly:music? ly:music? )
#{
\mark \markup { \gridCoinPath }
\once \override ChordName.extra-offset = #'(1 . .5 )
$mus1
\once \override ChordName.extra-offset = #'(-2 . -4 )
$mus2
\once \override ChordName.extra-offset = #'(1 . -1 )
$mus3
#})
x = #(define-music-function
(parser location mus1 mus2 mus3 mus4 )
( ly:music? ly:music? ly:music? ly:music? )
#{
\mark \markup { \croixPath }
\once \override ChordName.extra-offset = #'(0 . -0.5 )
$mus1
\once \override ChordName.extra-offset = #'(4 . 2 )
$mus2
\once \override ChordName.extra-offset = #'(-3 . -4 )
$mus3
\once \override ChordName.extra-offset = #'(1 . -1 )
$mus4
#})
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\new ChordNames \with {
\override BarLine.bar-extent = #'(-5 . 5)
\consists "Bar_engraver"
\consists "Staff_symbol_engraver"
\consists "Percent_repeat_engraver"
}
\chordmode {
\omit BarNumber
\override ChordNames.ChordName.extra-offset = #'(10 . -1
)
\override ChordNames.StaffSymbol.line-positions = #'( -10 10 )
\bar ".|:" bes1:7
\/ c2 d
e1
\v f2. c4 \break
\repeat percent 2 {e1}
\w c2 d4 c \noBreak
c1
f1:maj7
f:7
\x c4 e g c e1
\bar ":|."
}
\layout {
indent = 0
ragged-right = ##f
ragged-last = ##f
\context {
\Score
\omit BarNumber
\override SpacingSpanner.strict-note-spacing = ##t
proportionalNotationDuration = #(ly:make-moment 1/16)
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Le 13/03/2018 à 13:02, Didier Griffaut
a écrit :
Malheureusement, ce code ne fonctionne pas chez moi :(
Analyse...
Interprétation
en cours de la musique...[8]
Pré-traitement
des éléments graphiques.../usr/share/lilypond/2.18.2/scm/define-markup-commands.scm:950:59: In
procedure car in _expression_ (car x):
/usr/share/lilypond/2.18.2/scm/define-markup-commands.scm:950:59: Wrong type
(expecting pair): largeurs
Arrêté avec le code
de retour 1
\version "2.18.2"
\paper {
system-system-spacing.basic-distance = #20
}
gridPath =
\markup
\with-dimensions #'(0 . 0) #'(-4.3 . 2)
\path #0.1
#'((moveto 0 -15.1)
(rlineto 26.5 9.9)
)
coinPath =
\markup
\with-dimensions #'(0 . 0) #'(-4.3 . 2)
\path #0.1
#'((moveto 12.5 -10)
(rlineto 14.5 -5.1)
(moveto 12.5 -10) ; on peut remplacer par lineto pour ajuster les
largeurs de cellules
(rlineto 14.4 4.8)
)
%%%%%%%%%%%%%%%%%%%%%%%%%%
"\\/" = #(define-music-function
(parser location mus1 mus2)
( ly:music? ly:music? )
#{
\mark \markup { \gridPath }
\once \override ChordName.extra-offset = #'(1 . .5 )
$mus1
\once \override ChordName.extra-offset = #'(3 . -3 )
$mus2
#})
v = #(define-music-function
(parser location mus1 mus2 )
( ly:music? ly:music? )
#{
\mark \markup { \coinPath }
\once \override ChordName.extra-offset = #'(2 . -1 )
$mus1
\once \override ChordName.extra-offset = #'(-2 . -1 )
$mus2
#})
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\new ChordNames \with {
\override BarLine.bar-extent = #'(-5 . 5)
\consists "Bar_engraver"
\consists "Staff_symbol_engraver"
\consists "Percent_repeat_engraver"
}
\chordmode {
\omit BarNumber
\override ChordNames.ChordName.extra-offset = #'(10 . -1 )
\override ChordNames.StaffSymbol.line-positions = #'( -10 10 )
\bar ".|:" bes1:7
\/ c2 d
e1
\v f2. c4 \break
\repeat percent 2 {e1}
\v c2. d4 \noBreak
c1
f1:maj7
f:7 c e
\bar ":|."
}
\layout {
indent = 0
ragged-right = ##f
ragged-last = ##f
\context {
\Score
\omit BarNumber
\override SpacingSpanner.strict-note-spacing = ##t
proportionalNotationDuration = #(ly:make-moment 1/16)
}
}