lilypond-devel
[Top][All Lists]
Advanced

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

Re: Auto-beaming infrastructure redo


From: Carl Sorensen
Subject: Re: Auto-beaming infrastructure redo
Date: Fri, 2 Jul 2010 17:04:07 -0600



On 7/2/10 4:55 PM, "Hans Aberg" <address@hidden> wrote:

> On 2 Jul 2010, at 23:11, Carl Sorensen wrote:
> 
 
>> So, for example, we could have a fundamental unit of 1/8, and then
>> for a
>> time signature of 15/8, we might have a beat structure of
>> 
>> (2 3 (2 (3 2)) 3)
>> 
>> The first two eighth notes would be beamed together, as would the
>> third
>> through fifth, and the sixth through twelfth, and the thirteenth
>> through
>> fifteenth.  There would be a subdivision at 16th notes at 7/8, and a
>> subdivision at 32nd notes at 11/8.  This would try to demonstrate
>> the metric
>> relationship implicit in the beat structure.
>> 
>> If I were to implement something like this, it would make sense to
>> call the
>> context property beatStructure.  And actually, that might make sense
>> anyway.
>> Perhaps the name beatStructure is clearer than anything else I've
>> thought
>> of.
> 
> So there would be something like that, only that one has to think
> about how to blend in tuplets.
> 
> Your example might be written as
>    2+3+(2+(3+2))+3 * 1/8
> where * 1/8 is the eight note time unit. Using the pair notation, it
> can be moved in a to become
>    (2, 1/8) + (3, 1/8) + ((2, 1/8) + ((3, 1/8) + (2, 1/8))) + (3, 1/8)
> 
> when parsing it, on builds an AST (abstract syntax tree) which
> expresses the relation between the operators and their arguments:
>           +
>           |
>      [(2, 1/8), (3, 1/8), +, (3, 1/8)]
>                           |
>                  [(2, 1/8), ((3, 1/8), (2, 1/8)]
> 
> Now you see you do not need the pairs if you never want to have a
> mixture of time units. But I suspect using tuplets will force that.
> But otherwise, the structure would be the same.
> 
> If I throw in tuplets in this AST, setting them to 1:1, I get:
>           +
>           |
>      (1:1, [(2, 1/8), (3, 1/8), +, (3, 1/8)])
>                           |
>                  (1:1, [(2, 1/8), ((3, 1/8), (2, 1/8)])
> 
> That is, the tuplet p:q just appears as a pair (p, q) attached to the
> list.

But we don't need to introduce the tuplets in the LilyPond structure,
because the p:q for tuplets is already handled by LilyPond, as far as I can
tell.  At least for right now, I think we can use a single fundamental unit.

Thanks,

Carl





reply via email to

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