Hi everybody! I think it would be useful to add a repeat-type "none" to the repeat-types-alist in unfold-repeats (music-functions.scm), e.g.
(define-public (unfold-repeats types music) "Replace repeats of the types given by @var{types} with unfolded repeats. If @var{types} is an empty list, @code{repeated-music} is taken, unfolding all." (let* ((types-list (if (or (null? types) (not (list? types))) (list types) types)) (repeat-types-alist '((volta . volta-repeated-music) (percent . percent-repeated-music) (tremolo . tremolo-repeated-music) + *(none . music)* (() . repeated-music))) An example that demonstrates the reason for my request is attached. Any objections? Knut
\version "2.21.0" % Define all the music first start = \relative { \repeat volta 10 { c'4 d e f } } endA = \relative { g'2 a4 b c1 } endB = \relative { g'2 f4 d c1 } music = #(define-music-function () () #{ \start \end \bar "|." #}) % book template mybookdef = " \book{ \bookOutputSuffix \bookName \paper{ system-count = \mysyscount } \score { \unfoldRepeats \repList { \music } \layout{ } } } " mybook = #(define-scheme-function () () (ly:parser-include-string #{ \mybookdef #})) % "none" is not a valid 1st argument to \unfoldRepeats, % but the default action (ignore \unfoldRepeats) is what we want ;-) repList = none bookName = "A" end = \endA mysyscount = 1 \mybook bookName = "B" end = \endB mysyscount = 1 \mybook repList = volta bookName = "C" end = \endA mysyscount = 2 \mybook bookName = "D" end = \endB mysyscount = 3 \mybook
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel