[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to avoid barre and fingerboard shift in fret-diagram? [SOLVED]
From: |
MarcM |
Subject: |
Re: how to avoid barre and fingerboard shift in fret-diagram? [SOLVED] |
Date: |
Thu, 16 Oct 2014 18:25:38 -0700 (PDT) |
Through this snippet
https://github.com/stevage/Lilypond/blob/master/Documentation/snippets/fret-diagrams-explained-and-developed.ly
and this doc :
http://lilypond.org/doc/v2.18/Documentation/notation/instrument-specific-markup
I found out the function in the LSR http://lsr.di.unimi.it/LSR/Item?id=790
appends '(place-fret) to the (string fret) pairs and thus does not support
the syntax to indicate open strings. "(open 4)"
I changed the original function in the LSR to fix that and it works.
% Expand the (string fret) pairs to valid lilypond syntax
% ORIGINAL
#(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)))
% MODIFIED
% to allow to use other syntax of the fret-diagram syntax.
% the function accepts (string fret) pairs and i added a test to check if
the first element of a
% (string fret) pair is a number append '(place-fret) otherwise just return
the list
#(define (fret-from-list source target n1)
(if (null? source)
target
(fret-from-list
(cdr source)
(append target (list
(if (integer? (car (car source)))
(append '(place-fret) (car source)
(inverted (length target) n1))
(car source)
)
); list
)
n1)))
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/how-to-avoid-barre-and-fingerboard-shift-in-fret-diagram-tp167595p167630.html
Sent from the User mailing list archive at Nabble.com.