lilypond-user
[Top][All Lists]
Advanced

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

Re: Organization of the piese part by part, not staff by staff


From: Saul Tobin
Subject: Re: Organization of the piese part by part, not staff by staff
Date: Thu, 10 Jan 2019 16:37:21 -0800

Fundamentally, the data model of Lilypond is horizontal, even when you delve into the guts of how the program works (iterators, streams, engravers). My advice is to embrace that and adapt your workflow and thinking to take advantage of Lilypond's strengths, rather than fighting against it.

In my experience composing with Lilypond, dividing pieces into sections like this leads to more pain later on if I decide I want something like an overlapping hairpin between the sections. Yeah, it's a little annoying to count bars in each part if I decide to add a measure or change a time signature, but it's not that big a deal if you use barchecks and one measure per line of code.

Having a single variable for the music for each part to be extracted makes a lot of sense, since it keeps the composer in the mindset of what each player will be seeing.

My two cents.

On Thu, Jan 10, 2019 at 4:03 PM Valentin Villenave <address@hidden> wrote:
On 1/10/19, Павел Буданов <address@hidden> wrote:
> And I will add this music to score block:
> \refren \bar "||" \episodeA \refren \episodeB
> Is this case possible? If so, how to implement it correctly, where is the
> documentation written about it?

Greetings Pavel,
at its heart, LilyPond very much encourages «horizontal thinking»:
it’s easier to enter one melodic voice, then another, then another.

However, there are a few ways to enter music section by section like
what you’re looking for. The first one is to use \context Staff (which
can re-use an existing Staff rather than create a \new one every
time):

%%%%%%%%%%%%%%%

FirstSection = <<
  \context Staff = "voice" \relative c' {
    c2 d e1
  }
  \context PianoStaff = "piano" <<
    \context Staff = "right" \relative c' {
      <g c g'>2 <g d' g> <c e g>1
    }
    \context Staff = "left" \relative c {
      \clef bass
      e2 b c1
    }
  >>
>>

SecondSection = <<
  \context Staff = "voice" \relative c' {
    a'2 f4 a g1
  }
  \context PianoStaff = "piano" <<
    \context Staff = "right" \relative c' {
      <a c f>2 <c f a> <e g c> q
    }
    \context Staff = "left" \relative c {
      \clef bass
      f,4 g a b c2 c
    }
  >>
>>

\score {
  {
    \FirstSection
    \bar "||"
    \SecondSection
  }
}

%%%%%%%%%%%%%%%%%

The second trick you may be interested in learning, is \parallelMusic
(which allows you to enter polyphonic music with every voice at once).
Have a look at this chapter:
http://lilypond.org/doc/stable/Documentation/notation/multiple-voices#writing-music-in-parallel

Good luck!

V.

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

reply via email to

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