John, Le mercredi 19 avril 2023 à 16:25 +0200, John McWilliam a écrit :
> Hi,
> I’m trying to get a tie to cross the barline into a split
> voice measure. I have tried with and without the \voiceOne command but cannot
> get this to work. Can any one help me?
>
There are several issues with your syntax.
- Outcomment the `\voiceOne` command,
- Remove `\stemUp` and `\stemDown`. They're not useful, as `\voiceOne` and
`\voiceTwo` take care of stem directions automatically.
- Do not put a `\\` separator when using this syntax. The `\\` separator
instructs LilyPond to create the voices (with `\voiceOne`, etc.) implicitly.
Here, you're doing it explicitly.
- It should be `\new Voice { ... }` and not `{ \new Voice ... }`.
- You should put `\oneVoice` after the `<< >>` construct in order to reset the
stem direction to be computed automatically. Otherwise, since your voice
continued from the `{ \voiceOne ... }` part, it's still in `\voiceOne`, which
forces stem to point up.
Here is the complete code:
```
\version "2.24.1"
\score {
\relative c'' {
\clef "treble" \key f \major \time 6/8
c4 r8 f,4. | % 2
f2.~ | % 3
<<
{
\voiceOne
f4 g8 a4 bes8 | % 4
c2.~ | % 5
c4
}
\new Voice {
\voiceTwo % Voice = "2"
r4 r8 f,4 f8 | % 4
a2.~ | % 5
a4
}
>>
\oneVoice
a8 a4 a8
} %end relative
} %ens score
```
Best,
Jean
signature.asc
Description: This is a digitally signed message part
