lilypond-user
[Top][All Lists]
Advanced

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

Re: Cross-staff ottava brackets with breaked line


From: Thomas Morley
Subject: Re: Cross-staff ottava brackets with breaked line
Date: Thu, 7 Jan 2021 22:04:11 +0100

Am Do., 7. Jan. 2021 um 18:33 Uhr schrieb Davide Parisi <davipari95@gmail.com>:
>
> Goodmorning,
> I'm transcribing "Scarbo" from Gaspard de la Nuit with Lilypond.
> There is a method for create a cross-staff ottava bracket with breaked line 
> like this example?
> https://ibb.co/rwLwd19
> Thanks for your attention!

How about below?
Note the inlined comments.


\version "2.21.6"

\score {
  \new PianoStaff
    <<
        \new Staff = "top"
          %% unrelated staff-staff-spacing
          %% Though, changing the values here has impact on the needed values
          %% for overriding the OttavaBracket.stencil
          \with { \override VerticalAxisGroup.staff-staff-spacing.padding = 4 }
          {
              \omit Score.TimeSignature
            \time 3/8
            \key gis \minor
            s4.*7
            R4.*2
          }
        \new Staff = "bottom"
          {
            \time 3/8
            \key gis \minor
            %% get simple numbers.
            \set Staff.ottavationMarkups = #ottavation-numbers
            %% makes crossing staves possible for OttavaBracket
            \override Staff.OttavaBracket.cross-staff = ##t
            %% increase thickness of the (dashed line)
            \override Staff.OttavaBracket.thickness = 2
            %% oberride the stencil using `make-connected-line` the values for
            %% the point-list are found by try and error.
            %% OttavaBracket starts a bit to the left and a little higher than
            %% default to facilitate tailoring the (dashed) line and for
            %% aesthetic reasons
            \override Staff.OttavaBracket.stencil =
              #(lambda (grob)
                 (ly:stencil-translate
                   (ly:stencil-add
                     (grob-interpret-markup grob (ly:grob-property grob 'text))
                     (make-connected-line
                       '((1.35 . 1.65)
                         (7 . 15.5)
                         (83 . 15.5)
                         (83 . 14.5))
                       grob))
                   '(-2 . 0)))

            \ottava #1
            \repeat tremolo 6 {
              \once \stemUp
              %% unreated Slur shaping
              %% Remark, I often use other overrides before applying \shape in
              %% order to avoid too extreme values
              %% Nevertheless, the Slur is not as flat as in the original...
              \override Slur.positions = #'(8 . 0)
              \override Slur.height-limit = 0.5
              \shape #'((0 . -4.5) (-5 . 7) (0 . -1) (0 . -0.5)) Slur
              <gis'' dis''' fisis'''>32(
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>
            }

            \repeat tremolo 6 {
              \change Staff = "bottom"
              \once \stemUp
              <gis'' dis''' fisis'''>32
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>
            }

            \repeat tremolo 6 {
              \change Staff = "bottom"
              \once \stemUp
              <gis'' dis''' fisis'''>32
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>
            }

            \repeat tremolo 6 {
              \change Staff = "bottom"
              \once \stemUp
              <gis'' dis''' fisis'''>32
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>
            }

            \repeat tremolo 6 {
              \change Staff = "bottom"
              \once \stemUp
              <gis'' dis''' fisis'''>32
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>
            }

            \repeat tremolo 6 {
              \change Staff = "bottom"
              \once \stemUp
              <gis'' dis''' fisis'''>32
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>
            }

            \repeat tremolo 6 {
              \change Staff = "bottom"
              \once \stemUp
              <gis'' dis''' fisis'''>32
              \change Staff = "top"
              <cisis'' e'' gis'' cisis''' e'''>)
            }
            \ottava #0
            \change Staff = "bottom"
            R4.*2
          }
    >>
    \layout {
      indent = 0
      ragged-right = ##f
    }
}

HTH,
  Harm

Attachment: atest-104-excerpt.pdf
Description: Adobe PDF document


reply via email to

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