Here again with a better 'minus' look:
\version "2.18.2"
#(set-global-staff-size 50)
plus =
#(define-music-function (parser location fingering) (ly:music?)
(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
(markup #:lower 0.3 (#:tiny
"+"))
(number->string finger)))))
(ly:music-property music 'tweaks)))
music))
minus =
#(define-music-function (parser location fingering) (ly:music?)
(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
(markup #:line
(#:translate
(cons 0.1 0.5)
(#:override
(cons (quote
thickness) 2.2)
(#:draw-line (cons
0.6 0)))))
(number->string finger)))))
(ly:music-property music 'tweaks)))
music))
{
gis'-\tweak ParenthesesItem.font-size #-4 -\parenthesize-\plus-2
g'-\minus-2
}
Cheers,
Pierre
2015-05-11 9:47 GMT+02:00 Pierre Perol-Schneider <
[email protected]>:
> Hi Gianmaria,
>
> How about:
>
> \version "2.18.2"
>
> plus =
> #(define-music-function (parser location fingering) (ly:music?)
> (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
> (markup #:lower 0.3 (#:tiny
> "+"))
> (number->string finger)))))
> (ly:music-property music 'tweaks)))
> music))
>
> minus =
> #(define-music-function (parser location fingering) (ly:music?)
> (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
> (markup #:lower 0.1 (#:small
> "-"))
> (number->string finger)))))
> (ly:music-property music 'tweaks)))
> music))
>
> {
> gis'-\plus-2
> g'-\minus-2
> }
>
> Cheers,
> Pierre
>
> 2015-05-11 8:41 GMT+02:00 Gianmaria <[email protected]>:
>
>> Does exist a 'standard' way to specify violin fingering like "-2" or "+2"?
>>
>> In fretless instruments we use the notation + or - because for each hand
>> position (first position, 3rd position etc.) fingers can occupy two
>> different position, low or high.
>>
>> For instance in first position, finger 2 on first string most often play g
>> or g#.
>>
>> Best regards, g.
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>
>
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user