lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalid input I expected to be valid


From: David Kastrup
Subject: Re: Invalid input I expected to be valid
Date: Sun, 09 Sep 2012 18:10:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

"Phil Holmes" <address@hidden> writes:

> {
>  \time 2/4
>  \times 2/3 {  g'4  g'4  g'4 } \p
> }
>
> gives:
>
> error: syntax error, unexpected EVENT_IDENTIFIER
>  \times 2/3 {  g'4  g'4  g'4 }
>                                \p
>
> I can see how to fix it by putting the \p inside the {} triplet
> marker, but I was surprised it's not valid syntax.

Where would you expect the \p to be here?  It is usually attached to the
preceding note.

It would be conceivable to attach the \p not syntactically to the
preceding element, but by virtue of following it in the resulting
sequential music.  In this particular case, it would not follow the g'4
however since the whole construct is wrapped into a TimeScaledMusic
event, and that's necessary for getting the tuplets right since the
resulting _durations_ can't distinguish 4/6 from 2/3 and don't even know
whether they are actual tuplets or just visually scaled durations.

So there is no single NoteEvent in the resulting sequential list that \p
could attach itself to.

Again, just _what_ did you expect the \p to be attached to when
expecting this to be valid input?  I don't see a really convincing
solution.  If I were to design LilyPond from scratch, I probably would
not have chosen dynamics to be post-events at all, meaning that
c\p d
would have resulting in d being the first note with piano, not c, and
you having to write
\p c d
in order to have c starting with piano.

But I guess that ship has sailed.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]