On 10/5/2019 4:53 AM, Simon Albrecht wrote:
Hi Ben,
your approach does work. It can be simplified quite a bit, mainly by
using shortInstrumentName and \RemoveAllEmptyStaves, and not using
keepAliveInterfaces, which you don’t even need. See ben-divisi.ly.
On 05.10.19 03:08, Ben wrote:
I didn't know if I should create the divisi staffgroups at the start
of the piece and then hide it until it's needed, or just use it on
the fly as needed (which is what I did here).
I think it’s more ‘messy’ and complicated creating them on the fly.
I’d much rather keep one of them filled with music throughout, have
the others quote that, and make full use of the keepAliveInterfaces
approach. In all but the most complicated cases one won’t really need
meddling with instrumentNames, which also removes the need to meddle
with manual breaks. But of course that’s also possible—see
demo-string-divisi.ly.
Best, Simon
Simon,
Wow this is so helpful thank you for that code. My brain never even
registered doing that as a possibility! Oops.
This looks great, much better. I do have one follow up question though...
Does your approach allow for clean part-printing? I put together a quick
test and it looks like they all get included for violin 1. I don't know
a straightforward way to accomplish one divisi per violin 1 part in this
special situation.
It wouldn't be the end of the world if you had to include all 6 parts on
every file but the players may have some frustrations about having to
highlight their part or something (assuming this 6-part divisi goes on
for several pages of the full score).
I figured I'd ask if there was a way. :)
Thanks!
*attached png*
%%%%% from ben.divisi.ly %%%%%%
\score {
\new Staff \violinIPart
\layout {
\context {
\Staff
\RemoveAllEmptyStaves
}
}
}
\version "2.19.83"
global = {
\key c \major
\time 4/4
}
violinI = \relative c'' {
\global
c1 e g e d c g e d c c
\break
<<
{ s1*12 }
\new StaffGroup \with {
alignAboveContext = "main"
systemStartDelimiter = #'SystemStartBrace
\override InstrumentName.self-alignment-X = -1
shortInstrumentName = \markup { \left-column { "Vl. I" "(div.)" } }
}
<<
\new Staff \with { shortInstrumentName = "1" }
{ c2 2 2 2 }
\new Staff \with { shortInstrumentName = "2" }
{ c1 1 }
\new Staff \with { shortInstrumentName = "3" }
{ c1 1 }
\new Staff \with { shortInstrumentName = "4" }
{ c1 1 }
\new Staff \with { shortInstrumentName = "5" }
{ c1 1 }
\new Staff \with { shortInstrumentName = "6" }
{ c1 1 }
>>
>>
\break
\repeat unfold 7 { c1 } \break
}
violinII = \relative c'' {
\global
\repeat unfold 30 { c1 }
}
viola = \relative c' {
\global
\repeat unfold 30 { d1 }
}
cello = \relative c' {
\global
\repeat unfold 30 { e,1 }
}
violinIPart = \new Staff = "main" \with {
instrumentName = "Violin I"
midiInstrument = "violin"
shortInstrumentName = "v1"
} \violinI
violinIIPart = \new Staff \with {
instrumentName = "Violin II"
midiInstrument = "violin"
shortInstrumentName = "v2"
} \violinII
violaPart = \new Staff \with {
instrumentName = "Viola"
midiInstrument = "viola"
shortInstrumentName = "vla"
} { \clef alto \viola }
celloPart = \new Staff \with {
instrumentName = "Cello"
midiInstrument = "cello"
shortInstrumentName = "cl"
} { \clef bass \cello }
\score {
\new StaffGroup \with {
systemStartDelimiter = #'SystemStartSquare
} <<
\violinIPart
\violinIIPart
\violaPart
\celloPart
>>
\layout {
\context {
\Staff
\RemoveAllEmptyStaves
}
}
}
\paper {
left-margin = 35\mm
right-margin = 15\mm
}
\pageBreak
\score {
\new Staff \violinIPart
\layout {
\context {
\Staff
\RemoveAllEmptyStaves
}
}
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user