Hi Thomas,

Here's an example of what I would do. Changing the short instrument
names to reflect what instruments are in use at a certain moment
clutters the music a bit; perhaps a music function of some sort might be
appropriate there.

Mark Witmer

===File ~/source/in_development/lilypond-misc/extra-staff.ly===
\version "2.17.11"

%% Temporary divisi staff example

\paper {
  raggedRight = ##f
  left-margin = 20\mm
}

DivisiViolinI = \relative c' { 
  %% Set up proper short instrument names
  \set Staff.shortInstrumentName = "Vl I" 
  \set StaffGroup.shortInstrumentName = ""
  a4 b c d 
  %% Revert short instrument names
  \set Staff.shortInstrumentName = "" 
  \set StaffGroup.shortInstrumentName = "Vl" 
}

DivisiViolinII = \relative c' { c4 d e f }

Violin = \new Staff \relative c' { 
  a4 b c d
  << \DivisiViolinI
     \new Staff \with { 
       shortInstrumentName = "Vl II"
     } \DivisiViolinII >>
  a b c d
}

%% Line breaks are usually good to have when you add a temporary
%% staff!
TopLevel = \new Dynamics { s1 \break s1 \break s1 }

\score {
  <<
    \TopLevel

    %% Make the Violin line a staff group so it shows a bracket 
    %% when in divisi

    \new StaffGroup \with { 
      instrumentName = "Violin" 
      shortInstrumentName = "Vl" } \Violin
  >>
}============================================================

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to