[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "inline" (scoped) definitions?
From: |
Kieren Richard MacMillan |
Subject: |
Re: "inline" (scoped) definitions? |
Date: |
Thu, 15 Jan 2004 11:35:59 -0500 |
Hello, Paul:
If I was not clear my question was what your idea had to do
with separating time information (in global) from the notes
in other sections. You didn't mention time signature in your hew
example.
The mention of time signatures in my original post was just as one
example of many possible applications, and how this technique might
make file construction cleaner -- it would work just as well with pedal
indication blocks, dynamic blocks, etc.
To specifically address the time signature issue, here's a quick
example -- instead of having:
timeVarOne = {...}
timeVarTwo = {...}
noteVarOne = {...}
noteVarTwo = {...}
timeBlock = \notes
{
...
\timeVarOne
\timeVarTwo
...
\timeVarTwo
\timeVarOne
...
}
noteBlock = \notes
{
...
\noteVarOne
\transpose c c' \noteVarOne
...
\noteVarTwo
\transpose c c' \noteVarTwo
...
}
you could have
timeBlock = \notes
{
{...} == timeVarOne
{...} == timeVarTwo
...
\timeVarTwo
\timeVarOne
...
}
noteBlock = \notes
{
{...} == noteVarOne
\transpose c c' \noteVarOne
...
{...} == noteVarTwo
\transpose c c' \noteVarTwo
...
}
That is, the note variable definitions are inside the note block, and
the time variable definitions are inside the time block.
Of course, you can (currently) simply stack them vertically, which
would be an improvement over my first example:
timeVarOne = {...}
timeVarTwo = {...}
timeBlock = \notes
{
...
\timeVarOne
\timeVarTwo
...
\timeVarTwo
\timeVarOne
...
}
noteVarOne = {...}
noteVarTwo = {...}
noteBlock = \notes
{
...
\noteVarOne
\transpose c c' \noteVarOne
...
\noteVarTwo
\transpose c c' \noteVarTwo
...
}
However, in my opinion, that's still not as "clean" as what I'm
proposing, since the first time you run into a definition (inside the
main block), there is no indication nearby of what that definition
actually comprises.
Did that example better answer your question?
Best regards,
Kieren.
p.s. I think I constructed this example so that simple variable
combination and "\repeat unfold" will not suffice as a substitution --
however, if I didn't, there are certainly examples that could be...
- "inline" (scoped) definitions?, Kieren Richard MacMillan, 2004/01/14
- Re: "inline" (scoped) definitions?, Paul Scott, 2004/01/14
- Re: "inline" (scoped) definitions?, Kieren Richard MacMillan, 2004/01/15
- Re: "inline" (scoped) definitions?, Paul Scott, 2004/01/15
- Re: "inline" (scoped) definitions?,
Kieren Richard MacMillan <=
- Re: "inline" (scoped) definitions?, Paul Scott, 2004/01/15
- Re: "inline" (scoped) definitions?, Kieren Richard MacMillan, 2004/01/15
- Re: "inline" (scoped) definitions?, Erik Sandberg, 2004/01/15
- Re: "inline" (scoped) definitions?, Kieren Richard MacMillan, 2004/01/17
Re: "inline" (scoped) definitions?, David Raleigh Arnold, 2004/01/14