%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,quote]
\include "lilypond-book-preamble.ly"


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

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



\paper {
  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))
  line-width = 160\mm - 2.0 * 10.16\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/numbers-as-easy-note-heads.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Snippet Repository
%% (http://lsr.di.unimi.it).
%%
%% Make any changes in the LSR itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.23.13"

\header {
%% Translation of GIT committish: a8a85e19654e46d725563e6deba44083ef137a2c
  texidocja = "
演奏を容易にする記譜法では、@code{NoteHead} オブジェクトの @code{note-names}
プロパティを使用し、符頭の内側に表示される文字を決定しています。@c
このプロパティをオーバライドすることで、スケールの度数を表す@c
数字を符頭に表示することができます。

全ての符頭オブジェクトに対してこれを適用するために、簡単なエングラーバを@c
作成することができます。
"
  doctitleja = "演奏を容易にする記譜法で数字を使用する"

%% Translation of GIT committish: 2f3474d9af596d677ed5b7ce720ae4d0954a6b51
  texidocit = "
Le teste di nota con nome della nota usano la proprietà @code{note-names}
dell'oggetto @code{NoteHead} per determinare cosa appaia
all'interno della testa.  È possibile sovrascrivere questa proprietà
e mostrare numeri corrispondenti ai gradi della scala.

Si può creare un semplice incisore che faccia questo per ogni
oggetto testa di nota che incontra.
"
  doctitleit = "Numeri dentro le teste di nota"

%% Translation of GIT committish: a3fd5364fc4f247579da0ed2bfea887ab37285c6
  texidocfr = "
En mode « easy play », les têtes de note utilisent la propriété
@code{note-names} attachée à l'objet @code{NoteHead} pour déterminer ce
qui apparaîtra dans la tête. Intervenir sur cette propriété permet
d'imprimer un chiffre correspondant au degré dans la gamme.

La création d'un graveur dédié permet de traiter toutes les notes.
"

  doctitlefr = "Easy play -- chiffres en lieu et place des lettres"

%% Translation of GIT committish: 262abf17c7827e88e3d509100c43920c8e225bec
  texidoces = "
Las cabezas de nota de notación fácil utilizan la propiedad
@code{note-names} del objeto @code{NoteHead} para determinar lo que
aparece dentro de la cabeza.  Mediante la sobreescritura de esta
propiedad, es posible imprimir números que representen el grado de la
escala.

Se puede crear un grabador simple que haga esto para la cabeza de cada
nota que ve.

"
  doctitlees = "Números como notas de notación fácil"

%% Translation of GIT committish: 262abf17c7827e88e3d509100c43920c8e225bec
  texidocca = "
Els caps de nota de notació fàcil utilitzen la propietat
@code{note-names} de l'objecte @code{NoteHead} per determinar el
que apareix dins del cap.  Mitjançant la sobreescriptura d'aquesta
propietat, és possible imprimir nombres que representen el grau de
l'escala.

Es pot crear un gravador simple que faci això per al cap de cada
nota que ve.

"
  doctitleca = "Nombres com notes de notació fàcil"

  lsrtags = "pitches"

  texidoc = "
Easy notation note heads use the @code{note-names} property of the
@code{NoteHead} object to determine what appears inside the note
head.  By overriding this property, it is possible to print numbers
representing the scale-degree.

A simple engraver can be created to do this for every note head object
it sees.
"

  doctitle = "Numbers as easy note heads"
} % begin verbatim


#(define Ez_numbers_engraver
   (make-engraver
    (acknowledgers
     ((note-head-interface engraver grob source-engraver)
      (let* ((context (ly:translator-context engraver))
	     (tonic-pitch (ly:context-property context 'tonic))
	     (tonic-name (ly:pitch-notename tonic-pitch))
	     (grob-pitch
	      (ly:event-property (event-cause grob) 'pitch))
	     (grob-name (ly:pitch-notename grob-pitch))
	     (delta (modulo (- grob-name tonic-name) 7))
	     (note-names
	      (make-vector 7 (number->string (1+ delta)))))
	(ly:grob-set-property! grob 'note-names note-names))))))

#(set-global-staff-size 26)

\layout {
  ragged-right = ##t
  \context {
    \Voice
    \consists \Ez_numbers_engraver
  }
}

\relative c' {
  \easyHeadsOn
  c4 d e f
  g4 a b c \break

  \key a \major
  a,4 b cis d
  e4 fis gis a \break

  \key d \dorian
  d,4 e f g
  a4 b c d
}



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