]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/event-listener.ly
Web-ja: update introduction
[lilypond.git] / ly / event-listener.ly
index 72a3e2407d78d34ede21317c54b2c3410c2141cf..4627aaa23c2760d87e096a2227aa85426f741f9d 100644 (file)
@@ -1,6 +1,6 @@
 %%%% This file is part of LilyPond, the GNU music typesetter.
 %%%%
 %%%% This file is part of LilyPond, the GNU music typesetter.
 %%%%
-%%%% Copyright (C) 2011--2012 Graham Percival <graham@percival-music.ca>
+%%%% Copyright (C) 2011--2015 Graham Percival <graham@percival-music.ca>
 %%%%
 %%%% LilyPond is free software: you can redistribute it and/or modify
 %%%% it under the terms of the GNU General Public License as published by
 %%%%
 %%%% LilyPond is free software: you can redistribute it and/or modify
 %%%% it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
 
 
 
 
 
 
-\version "2.15.31"
+\version "2.16.0"
 
 %%%% Helper functions
 
 
 %%%% Helper functions
 
@@ -40,7 +40,7 @@
    "Constructs a filename in the form
 @file{@var{original_filename}-@var{staff_instrument_name}.notes} if the
 staff has an instrument name.  If the staff has no instrument
    "Constructs a filename in the form
 @file{@var{original_filename}-@var{staff_instrument_name}.notes} if the
 staff has an instrument name.  If the staff has no instrument
-name, it uses "unnamed-staff" for that part of the filename."
+name, it uses \"unnamed-staff\" for that part of the filename."
    (let* ((inst-name (ly:context-property context 'instrumentName)))
      (string-concatenate (list
                           (substring (object->string (command-line))
    (let* ((inst-name (ly:context-property context 'instrumentName)))
      (string-concatenate (list
                           (substring (object->string (command-line))
@@ -66,7 +66,7 @@ program using the output of this function to interpret grace notes
 however they want (half duration, quarter duration?  before beat,
 after beat?  etc.)."
    (if
 however they want (half duration, quarter duration?  before beat,
 after beat?  etc.)."
    (if
-       (eq? 0 (ly:moment-grace-numerator moment))
+       (zero? (ly:moment-grace-numerator moment))
        (ly:format "~a" (format-moment moment))
        ;; grace notes have a negative numerator, so no "-" necessary
        (ly:format
        (ly:format "~a" (format-moment moment))
        ;; grace notes have a negative numerator, so no "-" necessary
        (ly:format
@@ -151,6 +151,10 @@ as an engraver for convenience."
    (print-line engraver
                "breathe"))
 
    (print-line engraver
                "breathe"))
 
+#(define (format-glissando engraver event)
+   (print-line engraver
+               "gliss"))
+
 #(define (format-tie engraver event)
    (print-line engraver
                "tie"))
 #(define (format-tie engraver event)
    (print-line engraver
                "tie"))
@@ -188,8 +192,8 @@ as an engraver for convenience."
 #(define (format-textspan engraver event)
    (let* ((context (ly:translator-context engraver))
           (moment (ly:context-current-moment context))
 #(define (format-textspan engraver event)
    (let* ((context (ly:translator-context engraver))
           (moment (ly:context-current-moment context))
-          (spanner-props (ly:context-property context 'TextSpanner))
-          (details (chain-assoc-get 'bound-details spanner-props))
+          (spanner-props (ly:context-grob-definition context 'TextSpanner))
+          (details (assoc-get 'bound-details spanner-props))
           (left-props (assoc-get 'left details '()))
           (left-text (assoc-get 'text left-props '())))
      (print-line engraver
           (left-props (assoc-get 'left details '()))
           (left-text (assoc-get 'text left-props '())))
      (print-line engraver
@@ -207,17 +211,18 @@ as an engraver for convenience."
   \Voice
   \consists #(make-engraver
               (listeners
   \Voice
   \consists #(make-engraver
               (listeners
-              (tempo-change-event . format-tempo)
-              (rest-event . format-rest)
-              (note-event . format-note)
-              (articulation-event . format-articulation)
-              (text-script-event . format-text)
-              (slur-event . format-slur)
-              (breathing-event . format-breathe)
-              (dynamic-event . format-dynamic)
-              (crescendo-event . format-cresc)
-              (decrescendo-event . format-decresc)
-              (text-span-event . format-textspan)
-              (tie-event . format-tie)))
+               (tempo-change-event . format-tempo)
+               (rest-event . format-rest)
+               (note-event . format-note)
+               (articulation-event . format-articulation)
+               (text-script-event . format-text)
+               (slur-event . format-slur)
+               (breathing-event . format-breathe)
+               (dynamic-event . format-dynamic)
+               (crescendo-event . format-cresc)
+               (decrescendo-event . format-decresc)
+               (text-span-event . format-textspan)
+               (glissando-event . format-glissando)
+               (tie-event . format-tie)))
   }
 }
   }
 }