[Top][All Lists]

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

Re: Scheme function to print out active Voice context during interpretat

From: Han-Wen Nienhuys
Subject: Re: Scheme function to print out active Voice context during interpretation?
Date: Mon, 15 Dec 2008 22:20:19 -0200

On Mon, Dec 15, 2008 at 8:12 PM, Trevor Bača <address@hidden> wrote:

> * OK, so based on this understanding, can somebody please correct my
> understanding of the parsing (not the iteration, just the parsing) of the
> following expression (which is the same as my original example #2):
>   {
>     \new Voice {
>       c'8 c'8 c'8 c'8
>     }
>     d'8 d'8 d'8 d'8
>   }
> If I'm understanding how the parser works, then what should result here is a
> music expression that looks like this:
>                  Global
>                     V
>                \new Score
>                     V
>                \new Staff
>                     V
>                \new Voice
>                     V
>                 Sequential
>                     V
>     \new Voice, d'8, d'8, d'8, d'8
>        V
>     Sequential
>        V
> c'8, c'8, c'8, c'8
> If I'm counting correctly, that's 15 total nodes in the expression tree.
> Eight atomic nodes and seven internal nodes. The Global, \new Score, \new
> Staff and the first \new Voice are all created implicitly.
> I know that the next part in the process is iteration. But I want to stop
> and check my understanding here: am I understanding the output of the parser
> correctly at this point?

No.  the \new Staff and \new Score are created at iteration time. Look
for path_to_acceptable_context().

Also, you can use the \displayMusic music function to get to the parse tree.
Han-Wen Nienhuys - address@hidden -

reply via email to

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