%--------------------------------------
\version "2.22.1"
\language "english"
% Helper function to invert first elements of scales
#(define (inverted num mod)
(if (zero? (modulo num mod))
(list '1 'inverted)
(list (1+ (modulo num mod)))))
% Expand the (string fret) pairs to valid lilypond syntax
#(define (fret-from-list l1 l2 n1)
(if (null? l1)
l2
(fret-from-list (cdr l1) (append l2 (list (append '(place-fret) (car l1) (inverted (length l2) n1)))) n1)))
% arg1 is the list of (string fret) pairs making up the scale
% arg2 is the number of unique tones in the scale (i.e. 7 for major scale, 5 for pentatonic)
% arg3 is a scale factor used to enlarge the fret diagram
#(define-markup-command (scale-diagramm layout props arg1 arg2 arg3) (list? integer? number?)
(interpret-markup layout props
(markup
(#:override (cons 'size arg3 )
(#:override '(fret-diagram-details
. (
(finger-code . in-dot)
(number-type . arabic)
(label-dir . -1)
(orientation . landscape)
(dot-radius . 0.4)
(fret-count . 8)
(top-fret-thickness . 7)))
#:fret-diagram-verbose
(fret-from-list arg1 '() arg2)))) ))
#(define-markup-command (verbose-diagramm layout props arg1 arg2 arg3) (list? integer? number?)
(interpret-markup layout props
(markup
(#:override (cons 'size arg3 )
(#:override '(fret-diagram-details
. (
(finger-code . in-dot)
(number-type . arabic)
(label-dir . -1)
(orientation . landscape)
(dot-radius . 0.4)
(fret-count . 8)
(top-fret-thickness . 7)))
#:fret-diagram-verbose
(fret-from-list arg1 '() arg3))))))
eclapC=\markup\bold\scale-diagramm #'((6 9)(6 11)
(5 9)(5 11)
(4 9)(4 11)
(3 8)(3 9)(3 11)
(2 9) (2 10) (2 12)
(1 9)(1 10)(1 12)
) #9 #5
eclapV=\markup\bold\verbose-diagramm #'((6 9 "cs")(6 11 "ds")(6 12 "e" red)
(5 9 "fs")(5 11 "gs" geen) (5 12 "a")
(4 9 "b" green)(4 11 "cs")
(3 8 "ds")(3 9 "e" red)(3 11 "fs")
(2 9 "gs"green) (2 10 "a") (2 12 "b" green)
(1 9 "cs")(1 11 "ds")(1 12 "e" red)
) #9 #5
\relative c' {
%<>^\eclapC^"Eric Clapton" cs ds e fs gs a b cs ds e fs gs a b cs ds e
<>^\eclapV cs ds e fs gs a b cs ds e fs gs a b cs ds e
}
%---------------------------------------------------
reste plus qu'a mettre en couleur sur la partition et le tittre et l'auteur et le nom de la gamme
jl
Le jeudi 05 octobre 2023 à 13:39 +0200, Martial R a écrit :
Bonjour,
c'est mieux d'envoyer les messages aussi sur la liste,
plus on est
plus on peut répondre mieux :- )
%------------------------La couleur
troisnotes=\markup\bold\verbose-diagramm #'((6 9 "cs")(6 11 "ds" orange)(6 12 "e" red)) #9 #5
\relative c' {
<>^\troisnotes cs ds e
}
%-------------------------------------------
liste des couleurs
--