lilypond-user-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dessins de manches de Guitare sous Lily


From: Martial R
Subject: Re: Dessins de manches de Guitare sous Lily
Date: Thu, 5 Oct 2023 09:40:22 +0200


Désolé pour les doublons, ça "merdouille" sur mon clavier :-)
voici :
https://lsr.di.unimi.it/LSR/Snippet?id=790



%--------------------------------------
\version "2.24.2"
\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 13 "e")
                                          (5 9 "fs")(5 11 "gs") (5 13 "a")
                                          (4 9 "b")(4 11 "cs")
                                     (3 8 "ds")(3 9 "e")(3 11 "fs")
                                     (2 9 "gs") (2 10 "a") (2 13 "b")
                                     (1 9 "cs")(1 10 "ds")(1 13 "e")
                                          ) #9 #5

\relative c' {
 %<>^\eclapC^"Eric Clapton" cs, ds fs gs b cs ds e fs gs a cs ds e    
 <>^\eclapV cs ds fs gs b cs ds e fs gs a cs ds e  
}

%---------------------------------------------------


reply via email to

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