]> git.donarmstrong.com Git - lilypond.git/commitdiff
Use make-music with music arguments
authorDavid Kastrup <dak@gnu.org>
Wed, 25 Sep 2013 12:34:38 +0000 (14:34 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 1 Oct 2013 05:42:01 +0000 (07:42 +0200)
input/regression/music-map.ly
scm/ly-syntax-constructors.scm

index 43f346deac8ea116688476a06c5dfcf03785daaf..ee6e1eeb1c0dee46323aa68c5bb6646f2fc63cae 100644 (file)
@@ -10,21 +10,14 @@ and dynamics are left over. These are put onto the 2nd measure."
 
 }
 
-\version "2.16.0"
+\version "2.17.27"
 
 #(define (notes-to-skip m)
   "Convert all stuff with duration (notes, lyrics, bass figures, etc.) to skips.
-Scripts and dynamics are maintained.
-"
-  (if (memq 'rhythmic-event (ly:music-property m 'types))
-   (let* ((newmus (make-music 'SkipEvent)))
-    (map
-     (lambda (x) (ly:music-set-property! newmus (car x) (cdr x)))
-     (ly:music-mutable-properties m))
-    newmus
-  )
-   m)
-)
+Scripts and dynamics are maintained."
+  (if (music-is-of-type? m 'rhythmic-event)
+      (make-music 'SkipEvent m)
+      m))
 
 
 \layout { ragged-right= ##t }
index 8b6f4ffefbf01c2ff05fdedce13467e679872e1e..b3d7f3f0f01cf942ef71f7db0caa19fd47db742f 100644 (file)
   "Extract @code{'direction} and @code{'text} from @var{music}, and transform
 into a @code{MultiMeasureTextEvent}."
 
-  (if (memq 'script-event (ly:music-property music 'types))
-      (apply make-music 'MultiMeasureTextEvent
-             (flatten-alist (ly:music-mutable-properties music)))
+  (if (music-is-of-type? music 'script-event)
+      (make-music 'MultiMeasureTextEvent music)
       music))
 
 (define-ly-syntax (multi-measure-rest parser location duration articulations)