[Top][All Lists]

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

Re: Spacer Rests Global Confusion

From: Br. Samuel Springuel
Subject: Re: Spacer Rests Global Confusion
Date: Thu, 26 Apr 2018 14:18:08 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 4/26/18 12:02 PM, R wrote:
This shows the default duration as a sixteenth note which should be
NOT even considered since it's within an uncalled variable. So why is
this spacer value magically applied to music when it resides it a
completely uncalled variable? This makes no sense to me. Even this
snippet makes things worse.

On 4/26/18 1:34 PM, David Kastrup wrote:
You are laboring under the wrong impression that there is a "default duration" of a quarter note. There isn't. The_initial_ default duration is that of a quarter note. Whenever a duration is entered
as a note or chord or s or syllable length, it becomes the new
default duration.

If it helps, I tend to avoid thinking of it as "default" altogether.
Rather the parser understands the concept of "last duration encountered"
and that is initialized to be 4.  "Default" to me always implies "fall
back" position which could come into play under various circumstances
which I may (or may not) fully understand.  "Initialization" only
applies to the very beginning of the file.  After that I either have to
trace the parser's actions line by line (and maybe even character by character) or all bets are off.

On 4/26/18 1:04 PM, R wrote:
I know but I never called it with a backslash was my point. It's uncalled. I was trying to figure out what contents of an uncalled variable leak out into impacting later code in the input file regardless of it never being called ever. Thanks.

The way I think about this is to distinguish between the parser and the "interpreter" (which is basically everything else). The parser reads the input from start to finish in order in order to create a "code" representation of it (a set of instructions). It has to go in order and cannot jump around, so "last encountered..." necessarily refers to what comes first "physically" in the input file (including includes). Once my input is translated into the "code" representation, the "interpreter" can follow the instructions therein to render the score. Because the complete instruction set is available at this point, the "interpreter" is not bound by linearity and can jump around based on variable references and the like.

Of course, I have no idea if this is how it actually works. It's just the working model I have in my head that thus far has proven productive when trying to grasp why LilyPond works the way it does.

Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)


reply via email to

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