]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/music-functions-init.ly
Doc-fr: NR-1.5 Simultaneous
[lilypond.git] / ly / music-functions-init.ly
index 8b5cddf013b85acc882b66c15c8be09878375430..02e6b8647e7b55324dbc7faf4dadd07f7df13912 100644 (file)
@@ -763,10 +763,16 @@ Example:
                         (and (not (null? origins)) (car origins)))))))
      ;;
      ;; first, split the music and fill in voices
-     (for-each (lambda (m)
-                    (push-music m)
-                    (if (bar-check? m) (change-voice)))
-                  (ly:music-property music 'elements))
+     ;; We flatten direct layers of SequentialMusic since they are
+     ;; pretty much impossible to avoid when writing music functions.
+     (let rec ((music music))
+       (for-each (lambda (m)
+                  (if (eq? (ly:music-property m 'name) 'SequentialMusic)
+                      (rec m)
+                      (begin
+                        (push-music m)
+                        (if (bar-check? m) (change-voice)))))
+                (ly:music-property music 'elements)))
      (if (not (null? current-sequence)) (change-voice))
      ;; un-circularize `voices' and reorder the voices
      (set! voices (map-in-order (lambda (dummy seqs)
@@ -1024,7 +1030,8 @@ a context modification duplicating their effect.")
 shiftDurations =
 #(define-music-function (parser location dur dots arg)
    (integer? integer? ly:music?)
-   (_i "Scale @var{arg} up by a factor of 2^@var{dur}*(2-(1/2)^@var{dots}).")
+   (_i "Change the duration of @var{arg} by adding @var{dur} to the
+@code{durlog} of @var{arg} and @var{dots} to the @code{dots} of @var{arg}.")
 
    (music-map
     (lambda (x)