|
From: | Lukas-Fabian Moser |
Subject: | Re: Shortcut for \repeat unfold |
Date: | Sat, 25 Sep 2021 17:47:47 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
"\*" = #(define-music-function (n mus) (index? ly:music?) #{ \repeat $repeat-shorthand $n { #mus } #})Instead of debating a default repeat type and function, why not provide access to repetition as a music function with a clear name like \repeatFunction type n music And let the user decide how to abbreviate it? x = \repeatFunction unfold \etc
Maybe it helps to give some context: The discussion started with the problem of skipping notes in lyrics (using \addlyrics {} / \lyricsto {}) in the documentation. In order to skip multiple notes, the documentation currently suggests ugly things like
\repeat unfold 2 { \skip 1 } that a) are very cumbersome, b) contain a mandatory-yet-unused duration argument.I think b) can be remedied by using "" instead of the skip (I'm not sure yet if it's really equivalent), which leads to
\repeat unfold 2 ""And I think it would be nice to have an even more natural variant for that; I think it's reasonable to provide & show/recommend convenient solutions for standard tasks (rather than say "you can define your own abbreviation here if you know how to do so") - for example,
\*2 "" or \x2 "" which would be my favourite. Lukas
[Prev in Thread] | Current Thread | [Next in Thread] |