[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Layout of a (piano) hand indicator
From: |
Thomas Morley |
Subject: |
Re: Layout of a (piano) hand indicator |
Date: |
Mon, 7 May 2018 22:57:35 +0200 |
2018-05-07 20:25 GMT+02:00 foxfanfare <address@hidden>:
> I just played a little with the complex snippet of Harm and it worked like a
> charm!
> You definitely should put this code in the snippets directory!
>
>
> Thomas Morley-2 wrote
>> %% FingeringColumn present, because two or more fingerings present and
>> %% `fingeringOrientations' is `left'
>> %%
>> %% need to manually adjust Fingerings, but sometimes FingeringColumn
>> still
>> %% delivers surprises ...
>
> I didn't understand where was the problem actually?
>
> I take the opportunity to ask a question about this FingeringColumn
> interface which I don't understand. I tried to shorter the distance between
> fingerings when they are in column but without succes.
>
> I can get it worked with: "\override Fingering.padding = #0" but this will
> then concern all the fingerings in the score (of course I can use \once but
> I will need to make that every time this occurs).
>
> The documentation mentioned a padding parameter for the
> fingering-column-interface wich seems interesting in this case, but nothing
> happen when I use this! What did I miss?
>
> Exemple:
> \version "2.19.81"
>
> \relative {
> \textLengthOn
> \set fingeringOrientations = #'()
> <c'-1e-2g-3>1^"normal"
> \once \override Fingering.padding = #0
> <c-1e-2g-3>^"OK but will affect every fingers"
> \once \override FingeringColumn.padding = #0
> <c-1e-2g-3>^"doesn't work?"
> }
Hi,
FingeringColumn is not easy to deal with and not really over-documented ...
FingeringColumn is only created if necassary at Staff-level.
Condition: fingeringOrientations contains left or right _and_ more
than one in-chord fingering is present.
So none of your examples create a FingeringColumn.
Also, see:
%% If FingeringColumn present, print.
printIfFC =
\override Staff.FingeringColumn.after-line-breaking =
#(lambda (grob) (format #t "\ngrob there? ~a" grob))
%% no FingeringColumn
\relative c' {
\printIfFC
\set fingeringOrientations = #'(down)
<c-1 e-2 g-3>1
\set fingeringOrientations = #'(up)
<c-1 e-2 g-3>1
}
%% no FingeringColumn
\relative c' {
\printIfFC
\set fingeringOrientations = #'(left)
<c'-1 e g>1
<c-1 e g>1-2-3
\set fingeringOrientations = #'(right)
<c-1 e g>1
<c-1 e g>1-2-3
}
%% FingeringColumn present because `fingeringOrientations' is 'left or 'right
%% _and_ more than one in-chord fingering is present
\relative c' {
\printIfFC
\set fingeringOrientations = #'(left)
<c'-1 e-2 g>1
<c-1 e-2 g>1-2-3
\set fingeringOrientations = #'(right)
<c-1 e-2 g>1
<c-1 e-2 g>1-2-3
}
%% FingeringColumn.padding
\relative c' {
\printIfFC
\set fingeringOrientations = #'(left)
<c'-1 e-2 g>1
\override Staff.FingeringColumn.padding = 5
<c-1 e-2 g>1
}
Btw, don't do \set fingeringOrientations = #'(), it creates a warning:
"no placement found for fingerings". Default is '(up down).
See:
%% Default fingeringOrientations are defined in Score-context.
%% Display them with:
printFingeringOrientations =
\context Score
\applyContext
#(lambda (ctx)
(format
#t
"\nIn ~a fingeringOrientations: ~a\n\tor look into engraver-init.ly"
ctx
(ly:context-property ctx 'fingeringOrientations)))
{
\printFingeringOrientations
R1
}
For default-`fingeringOrientations the fingerings are accumulated in
ScriptColumn together with other stuff.
See:
\relative {
\once \override ScriptColumn.after-line-breaking =
#(lambda (grob)
(let* ((scripts-array (ly:grob-object grob 'scripts))
(scripts
;; the check is probably not needed, better be paranoid, though
(if (ly:grob-array? scripts-array)
(ly:grob-array->list scripts-array)
'())))
(format #t "\nScriptColumn.scripts:\n~y" scripts)))
<c-1\1-\rightHandFinger #0 e-2 g-3>
%% demonstrate tweaking padding
<c-1 e-2 g-\tweak padding 4 -3>
}
HTH a bit,
Harm