%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/adding-extra-fingering-with-scheme.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

\header {
%% Translation of GIT committish: 0cc270b871321ae5aa8622cea8d8262aafd16641
  texidocja = "
@code{map-some-music} を用いることで、各音符に対して何かの要素を追加することが@c
できます。この例では、音符に運指記号を追加しています。

一般的には、作成したい音楽に対して @code{\\displayMusic} を適用して、@c
それを生成するような関数を手動で定義します。
"
  doctitleja = "Scheme で運指記号を追加する"

%% Translation of GIT committish: c043783aac6c35926d633aa2daf60ed4f2e7ca7a
  texidocfr = "
Il est possible, à l'aide de la fonction @code{map-some-music},
d'ajouter divers éléments à des notes. Voici comment attacher un script
supplémentaire à une note ou un accord.

En règle générale, réaliser préalablement un @code{\\displayMusic} sur
de la musique similaire à ce qui est recherché permettra d'en observer
la structure. Ceci pourra servir de canevas pour l'écriture de votre
code Scheme.
"

  doctitlefr = "Ajout d'un doigté supplémentaire avec Scheme"

%% Translation of GIT committish: 70abecb938c2bb752967bd56b7402dd8129838a5
  texidoces = "
Se pueden añadir elementos adicionales a las notas usando
@code{map-some-music}.  En este ejemplo se ajunta una inscripción
adicional a una nota.

En general se debe efectuar primero un @code{\\displayMusic} de la
música que queremos crear, para ver su estructura.  Más tarde,
podemos usar esto como plantilla para nuestro código de Scheme.

"
  doctitlees = "Incluir digitaciones adicionales con Scheme"

%% Translation of GIT committish: 98ac53591234404cd70c5eebd370a598ec74095b
  texidocca = "
Es poden afegir elements addicionals a les notes usant
@code{map-some-music}.  En aquest exemple s'adjunta una inscripció
addicional a una nota.

En general s'ha d'efectuar un @code{\\displayMusic} de la música que
volem crear, i després escriure una funció que faci la feina sobre
les parts adequades de la música en comptes de nosaltres.

"
  doctitleca = "Incloure digitacions addicionals amb l'Scheme"

  categories = "Scheme"

  texidoc = "
You can add additional elements to notes using @code{map-some-music}.
In this example, an extra script is attached to a note (or a chord).

In general, you should first apply @code{\\displayMusic} to music
similar to what you want to create so that you can see its structure.
This can be then used as template for your Scheme code.
"

  doctitle = "Adding extra fingering with Scheme"
} % begin verbatim


addScript =
#(define-music-function (script music) (ly:event? ly:music?)
   (map-some-music
    (lambda (mus)
      (define (append-script-at! prop)
        (set! (ly:music-property mus prop)
              (append (ly:music-property mus prop)
                      (list (ly:music-deep-copy script))))
        mus)

      (case (ly:music-property mus 'name)
        ((EventChord)
         (append-script-at! 'elements))
        ((NoteEvent)
         (append-script-at! 'articulations))
        (else #f)))
    music))

{
  \addScript _6 { c'4-3 <c' e' g'> }
}



% ****************************************************************
% end ly snippet
% ****************************************************************
