Kieren Richard MacMillan wrote:

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.


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...

I think as a programmer I agree with David that the macro/definitions are easier to find done the regular way. I sometimer end up with some pretty big notes sections even with all the shortcuts I take. I love the ability to define these macros in Lily and other text-based software.


Paul







_______________________________________________
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user

Reply via email to