Hi,
2018-01-28 19:52 GMT+01:00 Blöchl Bernhard
<address@hidden>:
I experimente with this fingering notation:
\version "2.19.80"
\layout {
\context {
\TabStaff
This should go into TabVoice not TabStaff, imho
\override StrokeFinger.digit-names = ##("P" "I" "M" "A" "X")
\consists New_fingering_engraver
strokeFingerOrientations = #'(down )
}
%{
The finger characters under the chord are written one above the
other and
therefore unredable. To change this, I think there is some change in
the
source by the developers necessary.
Nope.
Some change by the user ;)
If you consist New_fingering_engraver you should also include
Script_column_engraver.
I'd go for Fingering_engraver and Fingering_column_engraver as well.
Tshe finger characters "upper case" are correct you see with this
"\set
strokeFingerOrientations = #'(right)" example.
The warnings show, that this case of fingering of of chords "down"
is not
considered.
%}
Not exactly.
Including the engravers building "column" already helps a bit.
Though, you're right in so far as TabStaff is usually regarded as a
notation where already is shown what to _do_.
Thus, fingerings, stroke-finger, string-numbers are superfluous.
That said, I think printing of stroke-fingerings should work if
actually desired.
I didn't figure why lilypond complains about unset side-axis in
TabVoice, though.
But I tried a proof-of-concept-engraver.
Please note the printed message :))
\version "2.19.65"
#(define Test_engraver
(lambda (ctx)
(let ((stroke-fingers '())
(str-fingr-or '()))
(ly:message
"\n\tTHIS CODE IS A PROOF OF CONCEPT. NOT TESTED. USE AT OWN
RISK.\n\n")
(make-engraver
((start-translation-timestep trans)
(set! stroke-fingers '()))
(acknowledgers
((stroke-finger-interface engraver grob source-engraver)
(set! stroke-fingers (cons grob stroke-fingers))
;; To prevent LilyPond complaining, side-axis is set here
;; It may be reset in `stop-translation-timestep'
(ly:grob-set-property! grob 'side-axis X)))
((stop-translation-timestep trans)
(let* ((str-f-or
(ly:context-property ctx 'strokeFingerOrientations
'(right)))
(cleaned-str-f-or
(if (and (member 'left str-f-or) (member 'right
str-f-or))
(filter
(lambda (e)
(not (eq? 'left e)))
str-f-or)
str-f-or))
(sorted-str-f-or
(sort cleaned-str-f-or (lambda (p q) (symbol<? p q))))
(rev-str-f (reverse stroke-fingers))
(alist
;; what a clumsy coding :((
(cond ((null? rev-str-f)
'())
((= (length sorted-str-f-or) 1)
(list (cons (car sorted-str-f-or) rev-str-f)))
((equal? sorted-str-f-or '(down up))
(list
(cons
(car sorted-str-f-or)
(list-head rev-str-f
(round (/ (length rev-str-f)
2))))
(cons
(cadr sorted-str-f-or)
(list-tail rev-str-f
(round (/ (length rev-str-f)
2))))))
((or (equal? sorted-str-f-or '(down left))
(equal? sorted-str-f-or '(down right)))
(list
(cons
(car sorted-str-f-or)
(car rev-str-f))
(cons
(cadr sorted-str-f-or)
(cdr rev-str-f))))
((or (equal? sorted-str-f-or '(left up))
(equal? sorted-str-f-or '(right up)))
(list
(cons
(car (last-pair sorted-str-f-or))
(car (last-pair rev-str-f)))
(cons
(car sorted-str-f-or)
(cdr (reverse rev-str-f)))))
((or (equal? sorted-str-f-or '(down left up))
(equal? sorted-str-f-or '(down right up)))
(cond ((= 1 (length rev-str-f))
(list (cons 'up rev-str-f)))
((= 2 (length rev-str-f))
(list
(cons 'down (car rev-str-f))
(cons 'up (cadr rev-str-f))))
(else '()
(list
(cons 'down (car rev-str-f))
(cons
(cadr sorted-str-f-or)
(cdr (reverse (cdr rev-str-f))))
(cons 'up (car (last-pair
rev-str-f)))))))
(else '()))))
(if (pair? alist)
(for-each
(lambda (x)
(let ((cdr-x (if (list? (cdr x)) (cdr x) (list (cdr
x)))))
(if (member (car x) '(left right))
(for-each
(lambda (g)
(ly:grob-set-property! g 'side-axis X)
(ly:grob-set-property! g 'X-offset
ly:side-position-interface::x-aligned-side))
cdr-x)
(for-each
(lambda (g)
(ly:grob-set-property! g 'side-axis Y)
(ly:grob-set-property! g 'Y-offset
ly:side-position-interface::y-aligned-side))
cdr-x))))
alist))))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% EXAMPLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\layout {
\context {
\TabVoice
\override StrokeFinger.digit-names = ##("P" "I" "M" "A" "X")
\consists #Test_engraver
\consists "New_fingering_engraver"
\consists "Fingering_engraver"
\consists "Script_column_engraver"
\consists "Fingering_column_engraver"
}
}
#(define RH rightHandFinger)
mus = \relative c {
\set strokeFingerOrientations = #'(left up )
c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4
\set strokeFingerOrientations = #'(down right up )
< c-\RH #1 e-\RH #2 g-\RH #3 > 4
}
<<
\new Voice \mus
\new TabVoice \mus
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user