Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Carl D. Sorensen
On 12/15/08 1:26 PM, "Francisco Vila" wrote: > 2008/12/15 Carl D. Sorensen : >> >> >> >> On 12/15/08 7:18 AM, "Han-Wen Nienhuys" wrote: >> >> >>> Try not to form mental models. Use the source instead. >> >> Unfortunately, not very many of us understand the source completely, and so >>

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Trevor Bača
On Mon, Dec 15, 2008 at 6:09 PM, Patrick McCarty wrote: > Hi Trevor, > > On Mon, Dec 15, 2008 at 2:12 PM, Trevor Bača 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 ex

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Trevor Bača
On Mon, Dec 15, 2008 at 6:21 PM, Han-Wen Nienhuys wrote: > On Mon, Dec 15, 2008 at 10:20 PM, Han-Wen Nienhuys > wrote: > > >> 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 > >> corre

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Han-Wen Nienhuys
On Mon, Dec 15, 2008 at 10:20 PM, Han-Wen Nienhuys wrote: >> 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

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Han-Wen Nienhuys
On Mon, Dec 15, 2008 at 8:12 PM, Trevor Bača 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 { >

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Patrick McCarty
Hi Trevor, On Mon, Dec 15, 2008 at 2:12 PM, Trevor Bača 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): > > { > \

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Carl D. Sorensen
On 12/15/08 3:12 PM, "Trevor Bača" wrote: > On Mon, Dec 15, 2008 at 2:09 PM, Han-Wen Nienhuys wrote: >> On Mon, Dec 15, 2008 at 5:25 PM, Carl D. Sorensen wrote: On 12/15/08 7:18 AM, "Han-Wen Nienhuys" wrote: >> Try not to form mental models. Use the s

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Trevor Bača
On Mon, Dec 15, 2008 at 2:09 PM, Han-Wen Nienhuys wrote: > On Mon, Dec 15, 2008 at 5:25 PM, Carl D. Sorensen > wrote: > > > > > > > > On 12/15/08 7:18 AM, "Han-Wen Nienhuys" wrote: > > > > > >> Try not to form mental models. Use the source instead. > > > > Unfortunately, not very many of us un

code comments (was Re: Scheme function to print out active Voice context during interpretation?)

2008-12-15 Thread demery
On Mon, Dec 15, 2008, Francisco Vila said: > I have a question for the few developers that in some degree do > understand the source code and are able to hack it, fix bugs, > implement new features, etc. > > Is the code properly commented, so that (thinking on the future) new > people can learn

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Carl D. Sorensen
On 12/15/08 2:26 PM, "Han-Wen Nienhuys" wrote: > 2008/12/15 Carl D. Sorensen : >> > >> I'd say it differently: >> >> EXPRESSIONS: >> Establish the timing of music-events relative to one another > >> CONTEXTS: >> Provide the evaluation environment (my words, not Han-Wen's) in which all >

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Han-Wen Nienhuys
2008/12/15 Carl D. Sorensen : > > I'd say it differently: > > EXPRESSIONS: > Establish the timing of music-events relative to one another > CONTEXTS: > Provide the evaluation environment (my words, not Han-Wen's) in which all > music events will be evaluated when it's time to put them in the

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Carl D. Sorensen
On 12/15/08 6:25 AM, "Trevor Bača" wrote: > On Sun, Dec 14, 2008 at 9:10 PM, Han-Wen Nienhuys wrote: >> On Mon, Dec 15, 2008 at 12:18 AM, Trevor Bača wrote: > > ... even though contexts do not literally nest! (Even though their iterators > inherit from one another.) > > So, to resume, thi

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Graham Percival
On Mon, Dec 15, 2008 at 09:26:15PM +0100, Francisco Vila wrote: > Is the code properly commented, so that (thinking on the future) new > people can learn from it without having to figure out all the time > what does each function, file etc. do? Sure, I can look at it and say, > but I want the opini

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Francisco Vila
2008/12/15 Carl D. Sorensen : > > > > On 12/15/08 7:18 AM, "Han-Wen Nienhuys" wrote: > > >> Try not to form mental models. Use the source instead. > > Unfortunately, not very many of us understand the source completely, and so > we need mental models to work in LilyPond. Of course, our mental mo

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Han-Wen Nienhuys
On Mon, Dec 15, 2008 at 5:25 PM, Carl D. Sorensen wrote: > > > > On 12/15/08 7:18 AM, "Han-Wen Nienhuys" wrote: > > >> Try not to form mental models. Use the source instead. > > Unfortunately, not very many of us understand the source completely, and so > we need mental models to work in LilyPon

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Carl D. Sorensen
On 12/15/08 7:18 AM, "Han-Wen Nienhuys" wrote: > Try not to form mental models. Use the source instead. Unfortunately, not very many of us understand the source completely, and so we need mental models to work in LilyPond. Of course, our mental models will be incorrect in some detail, and

Re: Scheme function to print out active Voice context during interpretation?

2008-12-15 Thread Han-Wen Nienhuys
On Mon, Dec 15, 2008 at 11:25 AM, Trevor Bača wrote: > 6. Lily reads the terminal close } brace. Even here, I'm willing to bet, > Lily sees no reason to kill off the explicit named "foo" context. I bet Lily > reads the terminal close } brace and instead simply closes off the original > music *exp

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Han-Wen Nienhuys
On Mon, Dec 15, 2008 at 12:18 AM, Trevor Bača wrote: > OK, this explanation is extremely helpful. But there's still something > deeply wrong. Han-Wen from a bit earlier: > > "Note that contexts do not 'nest' as you claim in a message below. > Voice contexts cannot contain any other context." > >

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Carl D. Sorensen
On 12/14/08 7:18 PM, "Trevor Bača" wrote: >> >> In examples 1 and 2+1 note, the first music occurs without a voice being >> defined. Therefore, LilyPond creates (instantiates) a voice. Voice foo is >> then created, and limited to the notes contained in the brackets. >> >> In example 2, Voi

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Trevor Bača
2008/12/14 Carl D. Sorensen > > > > On 12/14/08 4:34 PM, "Trevor Bača" wrote: > > > > > > I have a pretty big stockpile of tests and sometime in the next couple of > days > > I'll find a way to organize them and send them over. But I'd like to > start > > with the pair of examples that just seem

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread John Mandereau
Le dimanche 14 décembre 2008 à 17:41 -0700, Carl D. Sorensen a écrit : > A while ago there was a post suggesting that we do away with all implicit > instantiation and require users to explicitly instantiate contexts. That > went nowhere. I really think this feature is worth keeping it, if you rec

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Carl D. Sorensen
On 12/14/08 4:34 PM, "Trevor Bača" wrote: > > I have a pretty big stockpile of tests and sometime in the next couple of days > I'll find a way to organize them and send them over. But I'd like to start > with the pair of examples that just seems absolutely pathological to me. Here > it is: >

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Francisco Vila
2008/12/15 Trevor Bača : > (Stop and think what you'd expect here before looking at the output.) You're right, one expects something different at first, but then I remembered the "Temporary polyphonic passages" section under http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Multiple-voices

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Han-Wen Nienhuys
On Sun, Dec 14, 2008 at 4:42 PM, Trevor Bača wrote: > [The motivation is that I'm researching the way that LilyPond determines > which voice music events are assigned to ... from a user's perspective based > solely on looking at input files. Voice-resolution in the example above is > of course qu

Re: Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread John Mandereau
Hi Trevor! Le dimanche 14 décembre 2008 à 12:42 -0600, Trevor Bača a écrit : > Is there a way to print out the name (or other identity) of the > currently active voice just before any given note or rest in an input > file? > Does something like this exist? I haven't found such a function in Lily

Scheme function to print out active Voice context during interpretation?

2008-12-14 Thread Trevor Bača
Hi, Is there a way to print out the name (or other identity) of the currently active voice just before any given note or rest in an input file? I'm thinking something like this (please pardon the faux-Scheme) ... \new Staff << \context Voice = "foo" { c'4 #(print (something->st