X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fmusic-functions-init.ly;h=4bd7d03fa69fd03fdfa45fe7cb5295470878bc0f;hb=0af92ce9a3c54c75d1cb9643e50afc085b770759;hp=76c2ec64b882f079ec9fbf441076cfc30a305631;hpb=7738c6fa2759373c05e34b003a7ed521e9382f37;p=lilypond.git diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 76c2ec64b8..4bd7d03fa6 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -67,19 +67,20 @@ given fraction of the main note's duration has passed. If @code{afterGraceFraction} which has a default value of @code{3/4}.") (let ((main-length (ly:music-length main)) (fraction (or fraction (ly:parser-lookup 'afterGraceFraction)))) - (make-simultaneous-music - (list - main - (make-sequential-music - (list - - (make-music 'SkipMusic - 'duration (ly:make-duration - 0 0 - (* (ly:moment-main main-length) - (/ (car fraction) (cdr fraction))))) - (make-music 'GraceMusic - 'element grace))))))) + (descend-to-context + (make-simultaneous-music + (list + main + (make-sequential-music + (list + (make-music 'SkipMusic + 'duration (ly:make-duration + 0 0 + (* (ly:moment-main main-length) + (/ (car fraction) (cdr fraction))))) + (make-music 'GraceMusic + 'element grace))))) + 'Bottom))) %% music identifiers not allowed at top-level, @@ -104,7 +105,8 @@ a starting spanner event, or a symbol list in the form form of a spanner event, @var{property} may also have the form @samp{Grob.property} for specifying a directed tweak.") (if (ly:music? item) - (if (eq? (ly:music-property item 'span-direction) START) + (if (or (eqv? (ly:music-property item 'span-direction) START) + (music-is-of-type? item 'tie-event)) (tweak property (value-for-spanner-piece arg) item) (begin (ly:music-warning item (_ "not a spanner")) @@ -1506,6 +1508,12 @@ usually contains spacers or multi-measure rests.") 'element main-music 'quoted-music-name what)) +reduceChords = +#(define-music-function (music) (ly:music?) + (_i "Reduce chords contained in @var{music} to single notes, +intended mainly for reusing music in RhythmicStaff. Does not +reduce parallel music.") + (event-chord-reduce music)) relative = #(define-music-function (pitch music) @@ -1651,9 +1659,7 @@ appropriate tweak applied.") (define (offset-control-points offsets) (if (null? offsets) coords - (map - (lambda (x y) (coord-translate x y)) - coords offsets))) + (map coord-translate coords offsets))) (define (helper sibs offs) (if (pair? offs) @@ -1978,11 +1984,16 @@ unsets already in @var{music} cause a warning. Non-property-related music is ig (else (make-sequential-music lst)))))) unfoldRepeats = -#(define-music-function (music) (ly:music?) - (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or +#(define-music-function (types music) + ((symbol-list-or-symbol? '()) ly:music?) + (_i "Force @code{\\repeat volta}, @code{\\repeat tremolo} or @code{\\repeat percent} commands in @var{music} to be interpreted -as @code{\\repeat unfold}.") - (unfold-repeats music)) +as @code{\\repeat unfold}, if specified in the optional symbol-list @var{types}. +The default for @var{types} is an empty list, which will force any of those +commands in @var{music} to be interpreted as @code{\\repeat unfold}. Possible +entries are @code{volta}, @code{tremolo} or @code{percent}. Multiple entries +are possible.") + (unfold-repeats types music)) void = #(define-void-function (arg) (scheme?)