X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fcreating-double-digit-fingerings.ly;fp=Documentation%2Fsnippets%2Fcreating-double-digit-fingerings.ly;h=c1d0fb620fc3391b0f626b89591f590fa9c65b88;hb=32a34dcef0c0041c6d62677487a380b5c8b85712;hp=0000000000000000000000000000000000000000;hpb=f41973ff763d5972a85995b6d40c864281ec6714;p=lilypond.git diff --git a/Documentation/snippets/creating-double-digit-fingerings.ly b/Documentation/snippets/creating-double-digit-fingerings.ly new file mode 100644 index 0000000000..c1d0fb620f --- /dev/null +++ b/Documentation/snippets/creating-double-digit-fingerings.ly @@ -0,0 +1,48 @@ +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.dsi.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. +\version "2.16.0" + +\header { + lsrtags = "editorial-annotations, expressive-marks, scheme-language, staff-notation, tweaks-and-overrides" + + texidoc = " +By default you cannot make double-digit fingering notation (i.e. +numbers larger than 9). This is a hard coded limitation. + +This snippet shows two methods of creating fingerings larger than 9. + +" + doctitle = "Creating double-digit fingerings" +} % begin verbatim + + +ten = +#(make-music 'FingeringEvent + 'digit 10) + +fifty = +#(make-music 'FingeringEvent + 'digit 50) + +finger = +#(define-music-function (parser location digit) (integer?) + (make-music 'FingeringEvent + 'digit digit)) + +#(define (calc-finger-without-warning grob) + (let* ((event (event-cause grob)) + (digit (ly:event-property event 'digit))) + (number->string digit 10))) + +\relative c' { + % optional override to remove warnings for fingerings larger than 5 + \override Fingering #'text = #calc-finger-without-warning + c1\ten + c1\fifty + c1-\finger #36 + c1-\finger #29 +}