bug-lilypond
[Top][All Lists]
Advanced

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

Re: convert-ly produces invalid output for KeySignature.c0-position


From: Pavel Roskin
Subject: Re: convert-ly produces invalid output for KeySignature.c0-position
Date: Wed, 19 Jun 2013 17:00:59 -0400

On Wed, 19 Jun 2013 18:00:09 +0200
David Kastrup <address@hidden> wrote:

> Pavel Roskin <address@hidden> writes:
> 
> > Quoting David Kastrup <address@hidden>:
> >
> >> Pavel Roskin <address@hidden> writes:
> >>
> >>> I just hope you won't take away the ability to adjust the key
> >>> signature without placing the accidentals manually.
> >>
> >> It would appear that you can adjust the key signature just fine by
> >> using the _intended_ context variables for that.
> >
> > If you mean something other than the example below, please explain.
> 
> I am not going to second-guess what you are trying to do.  If you want
> to present an example of something not working as you expect it,
> you'll have to write it yourself.

I just wanted a clarification of your words.

Here's the whole story.  I entered or attempted to enter about 20
scores so far.  It's the second time I encounter a clef change in the
beginning of a piece.  Lilypond tries to simplify the score by setting
the clef in effect for the first note as the staff clef.  I believe
it's wrong.  Composers have reasons to write music like that.

Ideally, Lilypond should just set the first \clef applied to the staff
as the staff clef and the last \clef before the first note (if any and
if different) as the change clef. That should be enough.  It's unlikely
anyone would want to have three or more clefs in the beginning of a
staff.  But Lilypond doesn't do it.

So a simple workaround would involve a "zero note" - something that
would take no place and time but that would separate the change clef
from the beginning of the staff.  The problem is, there is no such
thing.  s1*0 and <> are to ephemeral.  Lilypond ignores them and changes
the staff clef.  \grace { s4 } has another set of problems.  If affects
the MIDI output, it causes visual artifacts you mentioned and it
needs to be present in every staff (I'm not sure the last requirement
still holds in the development version of Lilypond).

The workaround used in LSR 792 is more intrusive.  The staff clef is
internally the "first note clef", but its appearance is changed to the
desired staff clef.  The change clef is appended to the time signature
by overriding its stencil.

It turn out I forgot to adjust the key signature.  It needs to be
shows in the context of the imitated (visible) staff key.  That's why I
tried to change c0-position.  I want something simple and
self-contained that could be used as a macro.  Placing accidentals
manually would not satisfy that requirement.

As you have noticed, c0-position is set by lilypond internally without
any respect to the user setting (perhaps lilypond could be fixed
to respect the user's choice).  So it needs to be set at a very specific
point of time. I just went with the first solution that worked (setting
c0-position with the stencil).  I realize that it's very fragile, but
it's the best I have.

-- 
Regards,
Pavel Roskin



reply via email to

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