[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optionnal finger indication
From: |
Thomas Morley |
Subject: |
Re: Optionnal finger indication |
Date: |
Sun, 21 Oct 2018 11:30:34 +0200 |
Am So., 21. Okt. 2018 um 09:27 Uhr schrieb Jean-Julien Fleck
<address@hidden>:
>
> Thanks a lot Harm, it works perfectly !
A further thought:
Currently the code will return TextScript not Fingering. Thus we need
to mimic aligning/fontsize like Fingering and loose the possibility to
apply Fingering-overrides/tweaks and fingeringOrientations.
Below a code which will return proper Fingering. It may be called
directly or predefined for certain finger.
\version "2.19.82"
parDoigt =
#(define-event-function (doigt)(ly:music?)
(if (music-is-of-type? doigt 'fingering-event)
#{
-\tweak text
\markup {
\number
\concat {
\fontsize #-2 "("
$(number->string (ly:music-property doigt 'digit))
\fontsize #-2 ")"
}
}
$doigt
#}
doigt))
%% predefined using ""
"(1)" = \parDoigt -1
"(2)" = \parDoigt -2
"(3)" = \parDoigt -3
"(4)" = \parDoigt -4
"(5)" = \parDoigt -5
%% predefined using unicode-signs
⑴ = \parDoigt -1
%% predefined using superscript
par¹ = \parDoigt -1
{
%% direct call
c''-1\parDoigt -1
c''-1\"(1)"
c''-1\"(2)"
c''-1\"(3)"
c''-1\"(4)"
c''-1\par¹
c''-1\⑴
\set fingeringOrientations = #'(left)
<
c'-1^\"(2)"_\"(1)"
e'-2^\"(3)"_\"(3)"
g'-3^\"(4)"_\"(5)"
>
}
Cheers,
Harm