lilypond-user
[Top][All Lists]
Advanced

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

Re: Staff.instr


From: Cameron Horsburgh
Subject: Re: Staff.instr
Date: Thu, 8 Jun 2006 22:14:16 +1000
User-agent: Mutt/1.5.11+cvs20060403

On Thu, Jun 08, 2006 at 11:30:29AM +0200, Papazian Christophe wrote:
> I switch to lilypond-user...
> 
> So here is my problem :
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \header{
>   title = "Staff.instr ?"
> }
> 
> musique = \relative {
>   c d e f g a b c \break
> }
> 
> \relative { \set Staff.instrument = "test"
>       \set Staff.instr = "first"
>       \musique
>     \set Staff.instr = "second"
>       \musique
>     \set Staff.instr = "third"
>       \musique
>     \set Staff.instr = "last"
>       \musique
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> With 2.6.5, I obtain four staff lines, with labels  
> "test","second","third","last". This seems correct to me.
> But with 2.8.4, I obtain "test","first","first","first"... So it  
> breaks my codes when I upgraded.
> Is this a bug ? or is there some workaround ?
> 
> thank you,
> 
>       Christophe
> 
> 
I may have completely misunderstood your question. If so, please excuse me!

As I see it you seem to be trying to start new staffs by using a \break 
command. As far as LilyPond is concerned, however, you only have one staff, and 
it seems to pick the one that comes closest to the start of the music (ie 
'First.') I don't really remember, but it's possible the way Staff.instr was 
handled changed somewhere between 2.6 and 2.8.

Anyway, Lilypond can do this for you automatically, (and the bar numbers will 
be corrct as well, and everything will line up correctly!) Have a look at 
Section 2.8 (More staves) in the manual.

To get you started, here's how I would write your code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\header{
  title = "Staff.instr ?"
}

musique = \relative {
  c d e f g a b c
}

\relative {
  <<
    \new Staff{
      \set Staff.instrument ="Test"
      \musique
    }
    
    \new Staff {
      \set Staff.instrument ="First"
      \musique
    }
    \new Staff{
      \set Staff.instrument ="Second"
      \musique
    }
    \new Staff{ 
      \set Staff.instrument ="Last"
      \musique
    }
>>
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Hope this helps!
-- 

=============================================
Cameron Horsburgh

/dev/random says:
Dinner not ready: (A)bort (R)etry (P)izza

http://web.netcall.com.au/horsburgh

 ____            _ _      _ _ _ 
/ ___| _ __ ___ (_) | ___| | | |
\___ \| '_ ` _ \| | |/ _ \ | | |
 ___) | | | | | | | |  __/_|_|_|
|____/|_| |_| |_|_|_|\___(_|_|_)

=============================================





reply via email to

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