lilypond-user
[Top][All Lists]
Advanced

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

Re: How to silently change the current duration in music?


From: Mats Bengtsson
Subject: Re: How to silently change the current duration in music?
Date: Thu, 21 Dec 2006 22:10:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060926 Debian/1.7.8-1sarge7.3.1

The problem is that the approach won't work, since
when you do

\myVariable = { a }

the note will get a duration already when you do the
variable assignment, taken from the previous duration
used in the file. In general, the "sticky" durations are
handled directly when the file is parsed, so the only
thing that matters is the order the notes appear in the
input file.

You may want to use a pure preprocessor like m4 to
handle this situation.

 /Mats

Rick Hansen (aka RickH) wrote:

How can I change the "current" duration in my music without actually entering
something that will take up any beats?  IOW we all know that duration is
"sticky", it remains at whatever you last set it to so that you do not have
to continually type in duration numbers.  What command can I enter to "set"
the current duration but not actually put anything on the page?  I have a
feeling it would be with the make-moment command, but I'm not sure how to
use it.  Since it is syntactically incorrect to code a duration after a
variable like this:

\myVariable = { a }
\myVariable4

I would like to do something like this:

\myVariable = { a }
make-moment 1 4
\myVariable

So that the "a" comes out as a quarter note.

Is this possible?  If so what is the syntax to silently change the duration
without entering any music or rests etc.?

Thanks for any help on this.

Rick



--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        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]