lilypond-user
[Top][All Lists]
Advanced

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

Re: 'Can't Change Staff'


From: Trevor Bača
Subject: Re: 'Can't Change Staff'
Date: Wed, 31 Aug 2005 17:31:00 -0500

On 8/31/05, Trevor Bača <address@hidden> wrote:
> On 8/31/05, Will Oram <address@hidden> wrote:
> > I know I'm posting to the list a lot with my questions; I'm trying
> > out a lot of tricky notation snippets that, if successful, will
> > produce free scores that truly show the kickass things lily can do.
> > So...bear with me.
> >
> > lily 2.7.8, OS X 10.4
> >
> > I have centred dynamics working properly again (thanks, Trevor), and
> > I intend to be making extensive use of staff changing. Auto-change
> > won't be appropriate, so everything is done manually.
> >
> > The following code should produce two treble lines: the bottom has g8
> > followed by empty space, while the top starts on the bottom attached
> > to the g8 notehead, then changes back up. Frankly, I don't get the
> > logic myself, but it ain't my music.
> >
> > (more after code)
> >
> 
> <snip>
> 
> > ---
> >
> > When typesetting, this message comes up...
> >
> > Interpreting music...
> > warning: Change_iterator::process (): Staff = `up':
> > 3piano.ly:7:8: warning: can't change `Staff' to `down': not changing
> > to same context type:
> >
> >          \change Staff = "down"
> >
> > I imagine Dynamics is interfering, since everything else is Staff and
> > there should be no trouble. Nevertheless, I know staff changes must
> > be possible, because it is clearly visible in scores like this:
> > http://www.mutopiaproject.org/cgibin/piece-info.cgi?id=535 . Yet,
> > staring at the source, I can't find what I'm doing wrong for the life
> > of me.
> >
> > Any thoughts?
> 
> Hmm. I don't think it's the Dynamics context because commenting out
> the Dynamics context completely in the score { } block still generates
> the same error.
> 
> If, in your upper material, you insert another note *prior to* the
> \chang-ed g'' then the g'' changes to the lower staff just fine ...
> but I can't get it to work *starting on* the \change-ed g''.
> 
> Perhaps there's a bug that the first note in a Voice / Staff / Context
> (?) can't be changed? I don't have time to whip up a test file yet,
> tho ...

OK, had some time to set up a testfile and, yes, there's a bug with
\change first notes in a context.

Fortunately, there seems to be an easy workaround: stick a
"durationless skip" in front of the \change note (where a durationless
skip is anything of the form s1*0 or s2*0 or s4*0 or whatever).

So you're code works perfectly with the addition of exactly 1 line:

Replace ...

upper = \relative g'' {
    \clef "treble"
    \time 3/8

    \change Staff = "down"
    g16^(
        \change Staff = "up"
        g < eflat' g > g, \times 2/3 { < eflat' g > g, < eflat' g >) }
}

... with ...

upper = \relative g'' {
    \clef "treble"
    \time 3/8
    s4*0 % ADD THIS
    \change Staff = "down"
    g16^(
        \change Staff = "up"
        g < eflat' g > g, \times 2/3 { < eflat' g > g, < eflat' g >) }
}

... noting carefully the s4*0 before the context-first \change note.

I've attached a pretty picture all for the benefit of the at-home audience.

Also, when you finish your stuff, share. Because it looks like it might be cool.



-- 
Trevor Bača
address@hidden

Attachment: first-note-change.png
Description: PNG image


reply via email to

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