lilypond-user
[Top][All Lists]
Advanced

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

Three voices in same staff, from two variables


From: Ben Rosen
Subject: Three voices in same staff, from two variables
Date: Wed, 18 Mar 2020 15:41:51 -0400

Hi all,

I'm new here, so hopefully this isn't too basic of a question...

I'm trying to write out harmonizations for standard melodies, so my initial thought was to keep the melody in its own variable and the harmonies in another and then combine them using the "<< \\ >>" syntax (see below). This way, not only does it keep them conceptually separate in the file, but it would allow for multiple reharms that could be easily swapped out under the same melody. This seems to work fine when the harmony part is a single voice, but occasionally I want to break out into multiple voices to allow for moving inner parts. If I repeat the "<< \\ >>" syntax within the harmony part itself, then everything gets confused and it tries to draw a stem between parts that ought to be separate. Perhaps I should use something more explicit involving "\new Voice"? Is there a way to do this that preserves the variable structure I've laid out or is there a better approach for this situation?

Here is a simplified example of when things get confused:

\version "2.20.0"
\language "english"

melody = {
  af'2. af4 |
  af c g4. f8 |
}

harm = {
  << { <ef c>1 } \\ { bf2 af} >> |
  <df f> s |
}

\score {
  \relative c'
  <<
    \melody
    \\
    \harm
  >>
}

Thanks,
Ben

reply via email to

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