lilypond-user
[Top][All Lists]
Advanced

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

Re: Reusability of lilypond code?


From: Mason Hock
Subject: Re: Reusability of lilypond code?
Date: Wed, 27 Jun 2018 10:20:15 -0700
User-agent: NeoMutt/20180323-56-92914f-dirty

On 06/27, address@hidden wrote:
> But I have one issue with the reuse of my work. My last score e.g. has
> four voices (T1, T2, B1, B2). I assign music and lyrics for each voice
> to a variable and combine them info a choir staff. So for our
> rehearsal, everybody can see all the voices.
> 
> There are other usecases, where I would like to have only one
> voice per staff. I can do that with lilypond, of course, by reusing
> the variables that I created before.
> 
> Now comes the problem:
> 
> For the "one voice per staff" solution (and for midi files, by the
> way), the single voices have to be annotated with all "bells and
> whistles", like dynamics, for example.
> 
> But for the "four voices per staff", all the annotations would pile
> up (one 'p' above the other 'p' for the two tenor voices, for example)
> and with all the duplicated dynamic, hairpins, markup, the score would
> become unreadable.

I typically use a separate Dynamics staff, which can then be attached once to 
any music staff as appropriate. This will also align dynamics vertically, which 
is my preference. Notice that in the third example the p is not aligned with 
the other dynamics.

-----------------------------------------------------------------
\version "2.19.82"

notesA = \relative c' {
  a'2. a4 | a
}

notesB = \relative c' {
  d2. d4 | a
}

dynamics = {
  s2\fp\< s4 s\f s\p
}

notesBdynamics = \relative c' {
  d2.\fp\< d4\f a\p
}

\score {
  <<
    \new Staff \notesA
    \new Dynamics \with {
      \override VerticalAxisGroup.staff-affinity = #UP 
    } \dynamics
    \new Staff \notesB
    \new Dynamics \with {
      \override VerticalAxisGroup.staff-affinity = #UP 
    } \dynamics
  >>
  \layout { }
}

\score {
  <<
    \new Staff \partcombine \notesA \notesB
    \new Dynamics \with {
      \override VerticalAxisGroup.staff-affinity = #UP 
    } \dynamics
  >>
  \layout { }
}

\score {
  <<
    \new Staff \notesBdynamics
  >>
  \layout { }
}
-----------------------------------------------------------------

Attachment: signature.asc
Description: PGP signature


reply via email to

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