lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shortcut for \repeat unfold


From: Aaron Hill
Subject: Re: Shortcut for \repeat unfold
Date: Fri, 24 Sep 2021 17:12:39 -0700
User-agent: Roundcube Webmail/1.4.9

On 2021-09-24 4:32 pm, Jean Abou Samra wrote:
- "\* n music", very short but doesn't read as nicely I think,
  and I don't view repeats as special enough to warrant
  this kind of syntax with many special characters.

I would disagree. Such an abbreviation is sensible when repeating singleton notes. For smaller values of n, the proposed "\repeat n" could still be longer than just manually repeating a duration value:

  { \repeat 4 b'4 } vs { b'4 4 4 4 }

If the asterisk feels overloaded, you could use the multiplication sign:

%%%%
\version "2.22.0"

× = % U+00D7
#(define-music-function
 (count music) (number? ly:music?)
 #{ \repeat unfold #count $music #})

{ \×4 b'4 | \tuplet 3/2 \×3 { a'8 g' } fis'2 }
%%%%

Granted, many fonts make that look so much like "\x" that you probably would just use the letter 'x' instead if one does not mind giving up a single-letter command for the cause.


-- Aaron Hill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]