]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/defining-an-engraver-in-scheme--ambitus-engraver.ly
lilypond-manuals.css: edit color scheme and some spacing
[lilypond.git] / Documentation / snippets / defining-an-engraver-in-scheme--ambitus-engraver.ly
index 9f92c6f2abfefcaa19e2548d85f898bfbabe51f3..f6f6672e2ce669a8085db006695cb9eb27338252 100644 (file)
@@ -1,10 +1,11 @@
-%% 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.19.7"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.19.28
+\version "2.19.28"
 
 \header {
   lsrtags = "contexts-and-engravers"
@@ -45,8 +46,6 @@ grob.
 Rewrite of @code{Accidental_placement::add_accidental} from @file{lily/accidental-placement.cc}."
    (let ((pitch (ly:accidental-placement::accidental-pitch accidental-grob)))
      (set! (ly:grob-parent accidental-grob X) grob)
-     (set! (ly:grob-property accidental-grob 'X-offset)
-           ly:grob::x-parent-positioning)
      (let* ((accidentals (ly:grob-object grob 'accidental-grobs))
             (handle (assq (ly:pitch-notename pitch) accidentals))
             (entry (if handle (cdr handle) '())))
@@ -294,23 +293,23 @@ position of middle C and key signature from @var{translator}'s context."
      (let ((ambitus #f))
        ;; when music is processed: make the ambitus object, if not already built
        (make-engraver
-       ((process-music translator)
-        (if (not ambitus)
-            (set! ambitus (make-ambitus translator))))
-       ;; set the ambitus clef and key signature state
-       ((stop-translation-timestep translator)
-        (if ambitus
-            (initialize-ambitus-state ambitus translator)))
-       ;; when a note-head grob is built, update the ambitus notes
-       (acknowledgers
+    ((process-music translator)
+     (if (not ambitus)
+         (set! ambitus (make-ambitus translator))))
+    ;; set the ambitus clef and key signature state
+    ((stop-translation-timestep translator)
+     (if ambitus
+         (initialize-ambitus-state ambitus translator)))
+    ;; when a note-head grob is built, update the ambitus notes
+    (acknowledgers
           ((note-head-interface engraver grob source-engraver)
-          (if ambitus
-              (update-ambitus-notes ambitus grob))))
-       ;; finally, typeset the ambitus according to its upper and lower notes
-       ;; (if any).
-       ((finalize translator)
-        (if ambitus
-            (typeset-ambitus ambitus translator)))))))
+       (if ambitus
+           (update-ambitus-notes ambitus grob))))
+    ;; finally, typeset the ambitus according to its upper and lower notes
+    ;; (if any).
+    ((finalize translator)
+     (if ambitus
+         (typeset-ambitus ambitus translator)))))))
 
 %%%
 %%% Example