2017-03-24 22:25 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>:

>
>
> 2017-03-24 2:13 GMT+01:00 Andrew Bernard <andrew.bern...@gmail.com>:
>
>> Hi All,
>>
>>
>>
>> I have an unusual beaming situation in the piano work I am setting. The
>> composer I work with is fussy (very) about his visual gestures in notation
>> and it is incumbent on me to reproduce the beaming seen in the attached
>> image. The issue I am having difficulty with is where the beam for the
>> spanned group goes from up to down with no break – at the point where the
>> “treble^8” clef is introduced. Are there any smart solutions to such a
>> situation?
>>
>>
>>
>> I can ask to have this notated differently, but it would go against
>> various large scale structural patterns in the music. [Yes, we know it does
>> not follow engraving rules 😊]  So a technical lilypond solution would
>> be great.
>>
>>
>>
>> Andrew
>>
>
>
> Sorry to say, I usually throw away scores where the composer obfuscates
> things.
>

Anyway, here my attempt, some heavy ugliness in it, though, (see comments
inline)

\version "2.19.57"

stemBeams =
#(define-music-function (l1 l2)(list? list?)
#{
  \once \override Stem.beaming = #(cons l1 l2)
#})


\layout {
  \override NoteHead.stem-attachment = #'(0 . 0)
  \context {
    \Score
    proportionalNotationDuration = #(ly:make-moment 1/24)
    \override SpacingSpanner.uniform-stretching = ##t
  }
}

\new PianoStaff <<
\new Staff = "up"
  \with { \override VerticalAxisGroup.staff-staff-spacing.padding = 4 }
  {
  \cadenzaOn
  \stemUp
  \once \override Beam.positions = #'(8 . 8)
  b''!16[
  \stemBeams #'(0) #'(0 1)
  \times 4/5 { dis'' cis' dis'' b'! \stemBeams #'(0 1) #'(0) f''! }
  \stemBeams #'(0) #'(0 1)
  \times 4/5 { d' f''! bes' f''! \stemBeams #'(0 1) #'(0) gis' }
  \stemBeams #'(0) #'(0 1)
  b'!
  \stemBeams #'(0 1) #'(0)
  g''!
  \change Staff = "down"
  dis''!16]

  %% This one is really ugly, because the values are hardcoded
  %% Every slight change in layout will cause a new round of try-and-error
:(
  %% Currently I see no convincing method to automate it.
  \once \override Beam.after-line-breaking =
  #(lambda (grob)
     ;; the (commented) line below prints the list to terminal
     ;; c/p this list and change the values until they fit your needs
     ;(pretty-print (ly:grob-property grob 'beam-segments))
     (ly:grob-set-property! grob 'beam-segments
       '(((vertical-count . 0)
          (horizontal 55.65 . 85.5911087716535))
         ((vertical-count . 1)
          (horizontal 55.65 . 74.7368967716535))
         ((vertical-count . 1)
          (horizontal 76.9068967716535 . 78.8368967716535))
         ((vertical-count . 1)
          (horizontal 80.5068967716535 . 85.5911087716535))
         ((vertical-count . 2)
          (horizontal 55.65 . 58.3142607716535))
         ((vertical-count . 2)
          (horizontal 61.1842607716535 . 62.34926077165349))
         ((vertical-count . 2)
          (horizontal 73.5718967716535 . 74.7368967716535))
         ((vertical-count . 2)
          (horizontal 76.9068967716535 . 78.8368967716535))
         ((vertical-count . 2)
          (horizontal 80.5068967716535 . 82.4368967716535))))
          )


  \once \override Beam.positions = #'(-5 . -5)
  \once \override Score.NoteColumn. X-offset = -1.2
  \stemBeams #'(0 1 2) #'(0 1)
  \change Staff = "up"
  \stemDown
  fis'''!32[
  \change Staff = "down"
  \stemUp

  %% Remark
  %% I don't understand those strange values for Stem.beaming following
below
  %% and the need to set them in first place at all
  %% Causing the need to correct some with the override for 'beam-segments
above
  \stemBeams #'(0 1) #'(-1 0 1)
  gis''!32
  \change Staff = "up"
  \stemDown
  \stemBeams #'(-1 0 1) #'(-1 0 )
  a'''!16 cis'''! cis'''!
  \stemBeams #'(0 1 2) #'(0)
  a'''!32
  \change Staff = "down"
  \stemUp
  \stemBeams #'(0) #'(-2 -1 0)
  dis'''!32
  \change Staff = "up"
  \stemDown
  \stemBeams #'(-1 0 1) #'(-1)
  g'''!
  \change Staff = "down"
  \stemUp
  \stemBeams #'(0) #'(-2 -1 0)
  cis''' !
  \change Staff = "up"
  \stemDown
  bes'''! fis'''!16]
}

\new Staff = "down" {
    s2 s4 s32
    \times 4/5 {  gis''16[ dis''! gis''! ais'' b''!] }
    dis'''!
    s8
}
>>

Cheers,
  Harm
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to