lilypond-user
[Top][All Lists]
Advanced

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

Re: Distance between staffs


From: Lukas-Fabian Moser
Subject: Re: Distance between staffs
Date: Thu, 22 Jul 2021 17:29:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Hi Silvain,

Am 22.07.21 um 16:12 schrieb Silvain Dupertuis:

I made a chord version of the first Praeludium of the Wohltemperierte Klavier
(in which the chords were programmaticall reconstructed from the liste of notes)

As the chords extend on 2 and a half octaves,
I wanted to get them on a normal piano staff
and adjust the distance of staffs so that the would be like one staff with one space for an A3 note.

I'm not sure if I understand you correctly - shouldn't the space between bass and treble staff be a c' note?

Anyway: I had the idea of "faking" a piano staff by actually creating only one staff that has 10 lines and manually duplicating clefs etc. (Of course, this might imply followup problems in case you want to switch clefs in one staff etc.)

Proof of concept:

\version "2.22.1"

rightHand = \relative {
  r8 g'16 c e g, c e
}

leftHand = \relative {
  c'16 e r8 r4
}

\new Staff {
  \override Staff.StaffSymbol.line-positions =
  #(append (iota 5 -4 2) (iota 5 -16 2))
  \override Staff.Clef.stencil = #ly:text-interface::print
  \override Staff.Clef.text =
  \markup \combine
  \musicglyph "clefs.G"
  \raise #-4 \musicglyph "clefs.F"
  \override Staff.TimeSignature.stencil =
  #(grob-transformer
    'stencil
    (lambda (grob default)
      (ly:stencil-add
       default
       (ly:stencil-translate-axis default -6 Y))))
  <<
    {
      \override Rest.Y-offset = 0
      \rightHand
    }
    \\
    {
      \override Rest.Y-offset = -6
      \leftHand
    }
  >>

}

Of course, one might make everything more natural by letting the "hidden" c' line be at position 0 (so we would have to adjust Staff.middleCposition etc.)

Lukas



reply via email to

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