X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fnumbers-as-easy-note-heads.ly;h=b8e9f3421cae864b089d2098c4005602aaf800e2;hb=ce029bf611234b4ab53d6e7c79d4efe9258fd71a;hp=732b09e1271d3468ee35c30cc1b37b9cfd0faecf;hpb=ce7347a5daec12396c1b8c831834f1c2cc66ea43;p=lilypond.git diff --git a/Documentation/snippets/numbers-as-easy-note-heads.ly b/Documentation/snippets/numbers-as-easy-note-heads.ly index 732b09e127..b8e9f3421c 100644 --- a/Documentation/snippets/numbers-as-easy-note-heads.ly +++ b/Documentation/snippets/numbers-as-easy-note-heads.ly @@ -1,56 +1,41 @@ -% Do not edit this file; it is automatically -% generated from Documentation/snippets/new -% This file is in the public domain. -%% Note: this file works from version 2.13.36 -\version "2.13.36" +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.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.18.0" \header { -%% Translation of GIT committish: a874fda3641c9e02f61be5c41b215b8304b8ed00 - 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" - 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. +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. -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 - (list - (cons 'acknowledgers - (list - (cons 'note-head-interface - (lambda (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)))))))) + (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)