lilypond-user
[Top][All Lists]
Advanced

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

Re: How to fix this divisi please


From: Valentin Villenave
Subject: Re: How to fix this divisi please
Date: Thu, 7 Feb 2019 07:55:19 +0000

On 2/7/19, Reggie <address@hidden> wrote:
> I don't know what to say but thank you from the bottom of my heart. You
> saved me and my code.

Thanks! Sure, what you posted wasn’t "minimal"… but at least it
worked, unlike the last time (where you had copied only a piece of the
code and we couldn’t compile it on its own), so I appreciate your
effort! :-)

> then I would have
> variables: violinone, violinonediv1, violinonediv2, violinonediv3, for the
> entire instrumentation? Wow that is a lot of variables :))

Yes, exactly. See below for an example of how I would do it; as you
can see, there are a _lot_ of variables.


> Second please, why do you need to  \remove Time_signature_engraver when you
> create my divisi part? I don't see why that is needed for me. Thanks!!!!

Well, since you’re starting in the middle of the score, it doesn’t
make sense to print a Time Signature like if it was the beginning.
However, this will also remove new Time Signatures, so if you need to
change \time in your divisi section, you’ll need to use something
else.

Just remove (or comment, by adding "%" at the beginning of the line)
my \remove line, and you’ll see the difference.

> One more thing. I wanted the markup center instrument name for Violin 1 a4
> div which you did perfect. But, you say I hackish a bit with making the
> StaffGroup in my violin variable. Well, how else would you be able to center
> a instrument name like you did if it wasn't a StaffGroup? What if I kept all
> instrument staffs separate and added them instead? How could you hide all
> instrument  names and replace with centered a4 divisi without Group? I feel
> like I did not bad :))

The only way to print a name for a group of staves is to (logically)
group them as a StaffGroup… (Or a GrandStaff, or ChoirStaff, or
PianoStaff, well you get the idea.)

As you may have noticed, I had to remove (or comment) the individual
names for each divisi staff; otherwise the name for the whole
StaffGroup would be added to these names and it would be messy.

> Please. in a simple MWE how can you have a group of string staffs like that
> without StaffGroup but also have shortInstrumentName = \markup
> \center-column {Vl. "(div. a 4)"} for each staff line separate?

Well, if you need to use your markup several times, you can put it in
a variable as well.

Here is how I would type your example, using many variables (and no
\tags, like I did earlier). As you can see, everything with notes is
defined first, and _then_ comes every structural information: what
should be printed where, in which group, coming after this and before
that, etc. I think it’s a bit cleaner that way.

Please also note that I created two new contexts, miniStaff and
miniStaffGroup (modified from Staff and StaffGroup), to avoid using
\with {…} too much.

%%%%%%%%%%%

scoreAViolinIbegin = \relative c'' {
  \repeat unfold 10 c1
  ges1
}
scoreAViolinImiddle = \relative c' {
  \repeat unfold 10 {c2 d}
}
scoreAViolinIend = \relative c' {
  \repeat unfold 20 fes1
}
scoreAViolinDivI = \relative c'' {
  \repeat unfold 10 g1:32
}
scoreAViolinDivII = \relative c'' {
  \repeat unfold 10 bes1:32
}
scoreAViolinDivIII = \relative c' {
  \repeat unfold 10 f1:32
}
scoreAViolinDivIV = \relative c'' {
  \repeat unfold 10 as1:32
}

scoreAViolinII = \relative c'' {
  \repeat unfold 50 d1
}

scoreAViola = \relative c' {
  \clef alto
  \repeat unfold 50 e1
}

scoreACello = \relative c {
  \clef bass
  \repeat unfold 50 f1
}

scoreAContrabass = \relative c {
  \clef bass
  \repeat unfold 50 g1
}

violinDivGroupName=\markup \center-column {Vl. "(div. a 4)"}

%% Big violin Staff and additional divisi.
%% (This will be used only in the full score.)

scoreAViolinConductor = {
  \scoreAViolinIbegin
  <<
    \scoreAViolinImiddle \break
    \new miniStaffGroup \with {
      instrumentName = \violinDivGroupName
      shortInstrumentName = \violinDivGroupName
    } <<
      \new miniStaff \scoreAViolinDivI
      \new miniStaff \scoreAViolinDivII
      \new miniStaff \scoreAViolinDivIII
      \new miniStaff \with {
        \override BarLine.allow-span-bar = ##f
      } \scoreAViolinDivIV
    >>
  >>
  \scoreAViolinIend
}

\score {
  \header { title = "Full Score." }
  \new StaffGroup <<
    \new Staff = "ViolinMain" \with {
      instrumentName = "Violin I"
      shortInstrumentName = "Vl. 1"
    } \scoreAViolinConductor
    \new Staff \with {
      instrumentName = "Violin II"
      shortInstrumentName = "Vl. 2"
    } \scoreAViolinII
    \new Staff \with {
      instrumentName = "Viola"
      shortInstrumentName = "Vla."
    } \scoreAViola
    \new Staff \with {
      instrumentName = "Cello"
      shortInstrumentName = "Vlc."
    } \scoreACello
    \new Staff \with {
      instrumentName = "Double Bass"
      shortInstrumentName = "Cb."
    } \scoreAContrabass
  >>
  %% Here’s the layout for _this_ \score only.
  %% (it doesn’t apply to individual parts.)
  \layout {
      \context {
        \Staff
        \name "miniStaff"
        alignAboveContext = "ViolinMain"
        fontSize = #-2
        \override StaffSymbol.color = #grey
        \remove Time_signature_engraver
      }
  \layout {
    \context {
      \Staff
      \name "miniStaff"
      alignAboveContext = "ViolinMain"
      fontSize = #-2
      \override StaffSymbol.color = #grey
      \remove Time_signature_engraver
    }
    \context {
      \StaffGroup
      \name "miniStaffGroup"
      \accepts "miniStaff"
      systemStartDelimiter = #'SystemStartSquare
    }
    \context {
      \StaffGroup
      \accepts "miniStaffGroup"
    }
  }
}

\paper {
  #(set-paper-size "a4")
  top-margin = 15\mm
  left-margin = 25\mm
  right-margin = 25\mm
  bottom-margin = 15\mm
}

\bookpart {
  \header {
    title = "Violin Part (main)"
  }
  \new Staff {
    \scoreAViolinIbegin
    \scoreAViolinImiddle
    \scoreAViolinIend
  }
}

\bookpart {
  \header {
    title = "Violin Part (div. 1)"
  }
  \new Staff {
    \scoreAViolinIbegin
    \scoreAViolinDivI
    \scoreAViolinIend
  }
}

\bookpart {
  \header {
    title = "Violin Part (div. 2)"
  }
  \new Staff {
    \scoreAViolinIbegin
    \scoreAViolinDivII
    \scoreAViolinIend
  }
}

%%%%%%%%%%%

Cheers,
V.



reply via email to

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