[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shared notes across piano staff
From: |
Paolo Prete |
Subject: |
Re: shared notes across piano staff |
Date: |
Fri, 13 Sep 2024 14:06:40 +0200 |
Hi,
instead of going crazy using LilyPond's native functions for
cross-staff, try using this, which supports exactly what you need:
https://github.com/paopre/Spontini/blob/master/documentation/tabular.md
Here’s the code that generates your complete music fragment:
<<
\easyCrossStaff %TMODE
{ | \hiddenTuplet 3/2 { s8 | s | s | s | s | s
| s | s | s | s | s | s | bes[ | s | s | a[ | s | s } | }
{ | \clef bass \hiddenTuplet 3/2 { c'8\rest | e[ | a] | c[ | e | a]
| d[ | aes | b!] | r | c[ | g] | s | d | g] | s | d | fis] } | }
#'( | C | - | - | - | - | -
| - | - | - | - | - | - | - | - | - | - | - | - | )
\crossStaffTableVoice "upper"
{ e'4 c' d'~d'8[ c'] bes4 a }
\crossStaffTableVoice "lower"
{ \stemDown fis,2 }
\crossStaffTableVoice "lower"
{ \stemDown d4\rest c <f,! d> e, d,2}
>>
As you can see, it’s abbreviated, formatted (look at it with monospace
font) and made much simpler to edit and more readable compared to
native LilyPond (when you try completing the example using the other
voices on the lower staff, you’ll notice this even more).
Not only that: you will later have to modify the inclination of the
beams and the slurs. And even this will be strongly simplified for you
with the editor (please read the documentation).
On Wed, Sep 11, 2024 at 8:05 PM Robert Garrigos <robert@garrigos.cat> wrote:
>
> Thanks Knute and Timothy,
>
> I did try with change staff, but it seemed not to work, and I guess it was
> because the bar wasn’t finished.
>
> Robert
>
> El 11 set. 2024, a les 19:51, Timothy Lanfear <timothy@lanfear.me> va
> escriure:
>
> On 11/09/2024 17:39, Robert Garrigos wrote:
>
> Hi,
>
> I have this piano excerpt I’m trying to reproduce:
>
> <Cursor_and_CP_Schum_47_pdf.jpeg>
> and I have this code:
>
>
> how can I have the bf and the a in the second measure shared across the
> staves??
>
>
> You need the \change Staff command
> https://lilypond.org/doc/v2.24/Documentation/notation/common-notation-for-keyboards#changing-staff-manually
>
> \version "2.24.0"
>
> \new PianoStaff <<
> \time 3/4
> \new Staff="upper" {
> \clef "treble"
> \new Voice {
> \voiceOne d'8 c' bes4 a4
> }
> }
> \new Staff="lower" <<
> \clef "bass"
> \new Voice \scaleDurations 2/3 {
> \voiceOne
> r8 c g
> \change Staff="upper" \once\stemDown bes8 \change Staff="lower" d g
> \change Staff="upper" \once\stemDown a8 \change Staff="lower" d fis
> }
> \new Voice {
> \voiceTwo
> e,4 d,2
> }
> >>
> >>
>
> --
> Timothy Lanfear, Bristol, UK.
>
>