X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fmusic-functions-init.ly;h=d41da5b5b6c925c8332ba498875d8b6deaffbdb0;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=9fe65613454f9c987b9b3d601b4a7afd3c7f2a17;hpb=4318f7fdda5d83c6db397ebb5f9f52d6daa36537;p=lilypond.git diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 9fe6561345..d41da5b5b6 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, @@ -829,20 +830,11 @@ transpose from @var{around} to @var{to}.") (music-invert around to music)) mark = -#(define-music-function - (label) ((number-or-markup?)) - "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 - (if label (set! (ly:music-property ev 'label) label)) - ev)))) +#(define-music-function (label) ((number-or-markup?)) + "Make the music for the \\mark command." + (if label + (make-music 'MarkEvent 'label label) + (make-music 'MarkEvent))) markupMap = #(define-music-function (path markupfun music) @@ -1994,6 +1986,28 @@ entries are @code{volta}, @code{tremolo} or @code{percent}. Multiple entries are possible.") (unfold-repeats types music)) +voices = +#(define-music-function (ids music) (key-list? ly:music?) + (_i "Take the given key list of numbers (indicating the use of +@samp{\\voiceOne}@dots{}) or symbols (indicating voice names, +typically converted from strings by argument list processing) +and assign the following @code{\\\\}-separated music to +contexts according to that list. Named rather than numbered +contexts can be used for continuing one voice (for the sake of +spanners and lyrics), usually requiring a @code{\\voiceOne}-style +override at the beginning of the passage and a @code{\\oneVoice} +override at its end. + +The default +@example +<< @dots{} \\\\ @dots{} \\\\ @dots{} >> +@end example +construct would correspond to +@example +\\voices 1,2,3 << @dots{} \\\\ @dots{} \\\\ @dots{} >> +@end example") + (voicify-music music ids)) + void = #(define-void-function (arg) (scheme?) (_i "Accept a scheme argument, return a void expression.