lilypond-user
[Top][All Lists]
Advanced

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

Re: Nesting variables inside music


From: Mats Bengtsson
Subject: Re: Nesting variables inside music
Date: Wed, 12 Mar 2008 17:26:59 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

Unfortunately, variables can only be defined at the top level, but
it's not uncommon to see one or several variables used in the definition
of another one.

  /Mats

Shadok wrote:
Hi, I am new to LilyPond and I wonder how to use
"local" variables inside a music expression.
I searched the list archives but did not find
anything.

Something like:

melody = { c'8 d' e'
  % long here
  x = {<g e' c'' b''>8}  % local assignment
  \x c \x d \x e         % use it
  % long after
}

It is easy to assign x outside (before) melody, but
if melody is long and the need of \x is local, it
would be more understandable to define it only where
needed.

What are the usual practices for that?

Thanks



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

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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