]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/ly-syntax-constructors.scm
CG-Build system notes: fix formatting and add a comment
[lilypond.git] / scm / ly-syntax-constructors.scm
index ebc40267afe25c83dbfd947bee8855ec853a9b9c..9cbec5fc4f55f61c6b28f17e558109da84e0a4b4 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2006--2011 Erik Sandberg <mandolaerik@gmail.com>
+;;;; Copyright (C) 2006--2012 Erik Sandberg <mandolaerik@gmail.com>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
 ;; we don't call the function but rather return the general
 ;; fallback.
 (define-ly-syntax (music-function parser loc fun args . rest)
-  (let* ((sig (object-property fun 'music-function-signature))
+  (let* ((sig (ly:music-function-signature fun))
         (pred (if (pair? (car sig)) (caar sig) (car sig)))
         (good (proper-list? args))
-        (m (and good (apply fun parser loc (reverse! args rest)))))
+        (m (and good (apply (ly:music-function-extract fun)
+                            parser loc (reverse! args rest)))))
     (if (and good (pred m))
        (begin
          (if (ly:music? m)
@@ -158,10 +159,10 @@ into a @code{MultiMeasureTextEvent}."
              'duration duration
              'origin location))
 
-(define-ly-syntax (repetition-chord parser location previous-chord repetition-function duration articulations)
-  (make-music 'RepeatedChord
-             'original-chord previous-chord
-             'element (repetition-function previous-chord location duration articulations)
+(define-ly-syntax (repetition-chord parser location duration articulations)
+  (make-music 'EventChord
+             'duration duration
+             'elements articulations
              'origin location))
 
 (define-ly-syntax-simple (context-specification type id ops create-new mus)
@@ -210,6 +211,9 @@ into a @code{MultiMeasureTextEvent}."
   (set! unique-counter (1+ unique-counter))
   (call-with-output-string (lambda (p) (format p "uniqueContext~s" unique-counter))))
 
+(define-ly-syntax-simple (lyric-event text duration)
+  (make-lyric-event text duration))
+
 (define (lyric-combine-music sync music loc)
   ;; CompletizeExtenderEvent is added following the last lyric in MUSIC
   ;; to signal to the Extender_engraver that any pending extender should
@@ -246,17 +250,3 @@ into a @code{MultiMeasureTextEvent}."
                                         'origin loc)))
                         addlyrics-list)))
     (make-simultaneous-music (cons voice lyricstos))))
-
-(define-ly-syntax (make-mark-set parser location label)
-  "Make the music for the \\mark command."
-  (let* ((set (and (integer? label)
-                  (context-spec-music (make-property-set 'rehearsalMark label)
-                                     'Score)))
-        (ev (make-music 'MarkEvent
-                        'origin location)))
-
-    (if set
-       (make-sequential-music (list set ev))
-       (begin
-         (set! (ly:music-property ev 'label) label)
-         ev))))