lilypond-user
[Top][All Lists]
Advanced

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

elementary macro problem


From: David Griffel
Subject: elementary macro problem
Date: Fri, 21 Jul 2017 15:22:32 +0100

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

reply via email to

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