On 03-04-16 13:30, Simon Albrecht wrote:
On 03.04.2016 08:15, Bernard wrote:
I would like to comprehend Lilyponds structure.
I read
http://lilypond.org/doc/v2.18/Documentation/learning/contexts-explained
and
https://docs.fedoraproject.org/en-US/Fedora/16/html/Musicians_Guide/sect-Musicians_Guide-LilyPond-Syntax-Commands-Contexts.html
That does seems logical.
So if I comprehend right :
Code implicit :
{c'}
Code explicit :
\score {
\new Staff {
\new Voice {c'}
}
}
Are similar. Not identical but similar.
1) Is that correct?
Yes, that’s what is explained in the Learning Manual.
3) I would like to use and to be able to disable the \with statement.
I don’t quite get what you want to do here. Please give more
explanation, and an example.
Ok Simon,
I tried to solve my problem myself, if I had enough info. But that make
it to abstract.
Please see the attached examples.
1 + 2) The first two are clear now.
3) With a \with statement does execute as expected.
4) Does use the \with statement but within "{ }"
This generate the error : unexpected \new
5) As 5 but "<< >>" Also generate an error
6) Does execute, but without a \with statement and without a voice
7) As 6 but with a voice, generate an error
My real code is much more complicated. All boils down to what is the
\with statement. That seems to be a very specific statement, which
controls also what happens outside the statement.
I have read
http://lilypond.org/doc/v2.18/Documentation/notation/interpretation-contexts.en.html
and associates pages. I assume it is related, but I do not really get it.
If I could view, within an implicit context , like :
{c'}
the full explicit context like :
\score {
\new Staff {
\new Voice {c'}
}
}
That would help a lot for understanding (and bug fixing). I just want to
comprehend this \with statement and contexts.
Thanks for your help,
Bernard
\version "2.18.2"
%1) Implicit
{c'}
%2) Explicit
\score {
\new Staff {
\new Voice {c'}
}
}
%3) Does run, using \with statement
\score {
\new Staff
\with {
\override StaffSymbol.line-count = #0
}
\new Voice {c'}
}
% 4)Generate error, using {} arround \with statement
\score {
\new Staff {
\with {
\override StaffSymbol.line-count = #0
}
}
\new Voice {c'}
}
% 5) Generate error, using << and >> arround \with statement
\score {
\new Staff <<
\with {
\override StaffSymbol.line-count = #0
}
>>
\new Voice {c'}
}
% 6) Does execute without \with statement and without voice
\score {
\new Staff {
\override Staff.StaffSymbol.line-count = #0
}
}
% 7) Generate error, without \with statement
\score {
\new Staff {
\override Staff.StaffSymbol.line-count = #0
}
% generate unexpected \new
\new Voice {c'}
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user