]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/music-functions-init.ly
Doc-de: update search-box
[lilypond.git] / ly / music-functions-init.ly
index a22292657fcb968b480df290ee347acea9253d18..4082ea9aec31c76d39422c0e6d8a9ad5a8604186 100644 (file)
@@ -315,7 +315,12 @@ without the need of a specific end spanner.")
         (ly:input-message location (_ "argument endSpanners is not an EventChord: ~a") music)
         music)))
 
-
+eventChords =
+#(define-music-function (parser location music) (ly:music?)
+   (_i "Compatibility function wrapping @code{EventChord} around
+isolated rhythmic events occuring since version 2.15.28, after
+expanding repeat chords @samp{q}.")
+   (event-chord-wrap! music parser))
 
 featherDurations=
 #(define-music-function (parser location factor argument) (ly:moment? ly:music?)
@@ -692,7 +697,9 @@ Example:
 ")
    (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
          (current-voices voices)
-         (current-sequence (list)))
+         (current-sequence (list))
+         (original music)
+         (wrapper #f))
      ;;
      ;; utilities
      (define (push-music m)
@@ -718,6 +725,16 @@ Example:
                       (let ((origins (remove not (map music-origin
                                                       (ly:music-property music 'elements)))))
                         (and (not (null? origins)) (car origins)))))))
+     (while (music-is-of-type? music 'music-wrapper-music)
+           (set! wrapper music)
+           (set! music (ly:music-property wrapper 'element)))
+     (if wrapper
+        (set! (ly:music-property wrapper 'element)
+                                 (make-music 'SequentialMusic
+                                             'origin location))
+        (set! original
+              (make-music 'SequentialMusic
+                          'origin location)))
      ;;
      ;; first, split the music and fill in voices
      ;; We flatten direct layers of SequentialMusic since they are
@@ -758,9 +775,12 @@ Example:
      ;; bind voice identifiers to the voices
      (for-each (lambda (voice-id voice)
            (ly:parser-define! parser voice-id
-                              (make-music 'SequentialMusic
-                                          'origin location
-                                          'elements voice)))
+                              (let ((v (ly:music-deep-copy original)))
+                                (set! (ly:music-property
+                                       (car (extract-named-music
+                                             v 'SequentialMusic))
+                                       'elements) voice)
+                                v)))
          voice-ids voices)))
 
 parenthesize =