lilypond-user
[Top][All Lists]
Advanced

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

Re: elementary macro problem


From: caagr98
Subject: Re: elementary macro problem
Date: Fri, 21 Jul 2017 16:29:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

If you're using 2.19, you might be able to use `thrice = \repeat unfold 3 \etc`. Otherwise, you'll have to use the explicit version.

On 07/21/2017 04:22 PM, David Griffel wrote:
I'm a fairly inexpert lilypond user. I've used simple macros before, but this one fails:

thrice = \repeat unfold 3

it produces an error message:  error: unknown escaped string: `\thrice'

Minimal example:
       thrice = \repeat unfold 3
       {\thrice {a b } }

The same thing happens if I drop the 3 and try to define rept = \repeat unfold.

The Notation Manual 3.4.4 says "... So far we’ve seen static substitution – when LilyPond sees \padText, it replaces it with the stuff that we’ve defined it to be (ie the stuff to the right of padtext=)."

It then goes on to

padText =
#(define-music-function
      (parser location padding)
      (number?)
    #{
      \once \override TextScript.padding = #padding
    #})


which looks more sophisticated than I need. I just want a short abbreviation of \repeat unfold
Maybe that's not possible without learning a good deal more?

David


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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