lilypond-user
[Top][All Lists]
Advanced

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

Re: spacing staff...can it be done?


From: Mats Bengtsson
Subject: Re: spacing staff...can it be done?
Date: Mon, 16 Dec 2024 11:11:31 +0100
User-agent: Mozilla Thunderbird


On 2024-12-14 12:07, David Kastrup wrote:
Dirck Nagy <dnagy@uwlax.edu> writes:

Hi all

In the past, i have used a separate voice as a "spacing voice" to
control measures per line, horizontal space, etc.

For example, if i wanted 4 measures in a line, i would write : "s1*4
\break. etc..." in the new voice.

However if i do this to a monophonic staff, the default stem direction
changes to either "all up" or "all down", simply because there are now
two "voices" present.
No, it doesn't.  Stem directions of voice contexts are not influenced by
the stem directions in other voice contexts.

It is an easy guess that you are using the << ... \\ .. >> shortcut for
creating parallel voices with _explicitly_ different stem direction.
Don't do that.  Introduce your ghost voice with

<< \context Voice { the normal voice ... } \new Voice { the ghost voice } >>

And in particular _not_ using \\ .

You can simplify even further and put everything in one and the same Voice:

\version "2.24.0"

spacing = {
s1*4 \break
s1*4 \break
}

melody = \relative c' {
c4 c g' g |
a a g2 |
f4 f e e |
d d c2 |
g'4 g f f |
e e d2 |
g4 g f f |
e e d2 |
c4 c g' g |
a a g2 |
f4 f e e |
d d c2 |
}

\score{
  \new Staff \new Voice << \spacing \melody >>
}


To see why/how this works, the following extended example shows how you actually can input chords by including several lines of music into the same voice. This is somewhat limited compared to using \parallelMusic, since if you for example replace the spacing notes in the alto part below by the note "c", you will get duplicated note heads on the same stem.

\version "2.24.0"

spacing = {
s1*4 \break
s1*4 \break
}

melody = \relative c' {
c4 c g' g |
a a g2 |
f4 f e e |
d d c2 |
g'4 g f f |
e e d2 |
g4 g f f |
e e d2 |
c4 c g' g |
a a g2 |
f4 f e e |
d d c2 |
}

alto = \relative c' {
s4 s e e | % Try replacing by c4 c e e, to see what happens!
f f e2 |
d4 d c c |
c b s2 |
}

\score{
  \new Staff \new Voice << \spacing \melody \alto >>
}

   /Mats





reply via email to

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