[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Variables and Bookpart
From: |
Mark Stephen Mrotek |
Subject: |
RE: Variables and Bookpart |
Date: |
Sun, 12 Mar 2023 17:20:23 -0700 |
Valentin,
Thank you for your input.
Note that my knowledge of programming and programming language does not exceed
what I learned In FORTRAN as the foreign language requirement of my Master's
degree.
My question then is, what file structure is used by others to combine multiple
movements into one "book" without having to retype something that is already in
each movement?
Your efforts on my behave are greatly appreciated.
Mark
-----Original Message-----
From: Valentin Petzel [mailto:valentin@petzel.at]
Sent: Sunday, March 12, 2023 4:25 PM
To: Mark Stephen Mrotek <carsonmark@ca.rr.com>; lilypond-user@gnu.org; Hans
Aikema <hans.aikema@aikebah.net>
Cc: jean@abou-samra.fr
Subject: Re: Variables and Bookpart
If I’m thinking correctly what Mark attempts to do is to have multiple files
containing scores and then to
\bookpart {
\include ...
}
to combine these scores. The problem here is quite simple: The notation
name = value
is something that is evalutated by the parser and will generally evaluate
differently depending on which context this is used in. Only on top level this
will be valuated to "define a music macro". In the context of an output def
such as \paper of \layout and in \header this is interpreted as "set this
particular property". In other cases this will only be allowed in conjuction
with the reserved keywords \override and \set.
Anyway the point is that the parser will not allow you to do this kind of
syntax if you are not at toplevel.
But that does not mean you cannot set such values, it just means you cannot use
this syntax for it. By directly setting the scheme binding we can still do
this:
\bookpart {
#(define ArightOne #{ \relative c'' { c b a b } #})
\score { \ArightOne }
}
(by the way this also allows us to define bindings the parser does not handle
well such as e.g. \c: c = ... will not be allowed, as c is a note name, but
#(define c ...) works).
Cheers,
Valentin
Am Sonntag, 12. März 2023, 23:51:28 CET schrieb Hans Aikema:
> > On 12 Mar 2023, at 20:38, Mark Stephen Mrotek <carsonmark@ca.rr.com>
> > wrote:
> >
> > Jean Abou Samra,
> >
> > Thank you.
> > Yes variables must (and are) placed before the \score in each
> > individual movement. That is why each complies perfectly when done
> > individually. The error appears when the code for the movement (that
> > compiles) is copied and pasted into the \bookpart.
> >
> > Your kind attention is appreciated.’
> >
> > Mark
>
> […]
>
> Mark,
>
> Based on your response I think you did not get the nuances of what
> Jean tried to tell you.
>
> The copying/pasting of your working score INSIDE \bookpart means that
> you are copying your variable definition (which is already properly
> outside the
> \score) INSIDE the \bookpart, while it should be outside both the
> \bookpart and the \score
>
> So you should
>
> {copy variables to here}
> \bookpart {
> {copy rest of the score here}
> }
>
> When using copy/paste of your score into a file with a \bookpart
>
>
> HTH
> Hans
- Re: Variables and Bookpart, (continued)
- Re: Variables and Bookpart, Jean Abou Samra, 2023/03/12
- RE: Variables and Bookpart, Mark Stephen Mrotek, 2023/03/12
- Re: Variables and Bookpart, Hans Aikema, 2023/03/12
- Re: Variables and Bookpart, Valentin Petzel, 2023/03/12
- Re: Variables and Bookpart, Saul Tobin, 2023/03/12
- Re: Variables and Bookpart, Jean Abou Samra, 2023/03/12
- Re: Variables and Bookpart, Saul Tobin, 2023/03/12
- Re: Variables and Bookpart, Jean Abou Samra, 2023/03/12
- Re: Variables and Bookpart, Saul Tobin, 2023/03/12
- Re: Variables and Bookpart, Jean Abou Samra, 2023/03/12
- RE: Variables and Bookpart,
Mark Stephen Mrotek <=
- RE: Variables and Bookpart, Mark Stephen Mrotek, 2023/03/12
- Re: Variables and Bookpart, Jean Abou Samra, 2023/03/12
- RE: Variables and Bookpart, Mark Stephen Mrotek, 2023/03/12
- Re: Variables and Bookpart, Werner LEMBERG, 2023/03/13