]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/creating-double-digit-fingerings.ly
Merge branch 'translation' into staging
[lilypond.git] / Documentation / snippets / creating-double-digit-fingerings.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.14.2"
8
9 \header {
10   lsrtags = "expressive-marks, tweaks-and-overrides, staff-notation, scheme-language, editorial-annotations"
11
12 %% Translation of GIT committish: 1cda7b7b8219cb97399b8e7b56c1115aaf82c002
13   texidocfr = "
14 Il est impossible, par défaut, de noter un doigté sur deux caractères --
15 autrement dit supérieur à 9.  C'est gravé dans le marbre.
16
17 Voici cependant deux méthodes pour créer des doigtés plus grands que 9.
18
19 "
20   doctitlefr = "Création de doigtés sur deux caractères"
21
22   texidoc = "
23 By default you cannot make double-digit fingering notation (i.e.
24 numbers larger than 9). This is a hard coded limitation.
25
26 This snippet shows two methods of creating fingerings larger than 9.
27
28 "
29   doctitle = "Creating double-digit fingerings"
30 } % begin verbatim
31
32
33 ten =
34 #(make-music 'FingeringEvent
35              'digit 10)
36
37 fifty =
38 #(make-music 'FingeringEvent
39              'digit 50)
40
41 finger =
42 #(define-music-function (parser location digit) (integer?)
43    (make-music 'FingeringEvent
44                'digit digit))
45
46 #(define (calc-finger-without-warning grob)
47    (let* ((event (event-cause grob))
48           (digit (ly:event-property event 'digit)))
49      (number->string digit 10)))
50
51 \relative c' {
52   % optional override to remove warnings for fingerings larger than 5
53   \override Fingering #'text = #calc-finger-without-warning
54   c1\ten
55   c1\fifty
56   c1-\finger #36
57   c1-\finger #29
58 }