[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guide finger
From: |
pabuhr |
Subject: |
guide finger |
Date: |
Sun, 19 Aug 2012 12:04:35 -0700 |
In *classical* guitar-music, there is a finger augmentation called a "guide
finger" indicating left-hand shifting. Nick Payne uses a mechanism based on the
glissando.
I found this code written for a finger shift on a violin, which I like because
it handles finger location and color, etc. However, for guitar, there are 3
kinds of finger shift: up, neutral and down, corresponding to about 30 degrees
up, flat and 30 degrees down for the "-" character.
So I can't make the changes to do what I want. 8-( I have sketched out what I
would like, which is 2 default parameters, the guide character and the rotation
amount, and to rotate this character before concatenating it with the string
number.
Any help would be greatly appreciated.
============================================================================
\version "2.14.2"
gn = #(define-music-function (parser location fingering) (ly:music?)
;; #:properties ((guide-char #x2013) (rotate-guide 0))
(let ((music (make-music 'FingeringEvent))
(finger (ly:music-property fingering 'digit)))
(set! (ly:music-property music 'tweaks)
(acons 'stencil
(lambda (grob)
(grob-interpret-markup grob
(make-concat-markup
(list
;; (rotate rotate-guide
(make-char-markup guide-char) )
(make-char-markup #x2013)
(number->string finger)))))
(ly:music-property music 'tweaks)))
music)
)
% gu = \override #'(rotate-guide 30) \gn
% gd = \override #'(rotate-guide -30) \gn
\relative c' {
\override Fingering #'color = #red
\set fingeringOrientations = #'(left)
<c-\gn-3>4
c4^\gn^3
c4-\gn-3
c4_\gn_3
\set fingeringOrientations = #'(right)
<c-\gn-3>4
% <c-\gu-3>4
% c4^\gu^3
% c4-\gu-3
% c4_\gu_3
}