2017-03-25 22:01 GMT+01:00 Juan Cristóbal Cerrillo <[email protected]>: > Hello Harm, > > If you use two voices as Jeffery suggested and adjust the Stem.beaming > parameters it seems that the following is not needed. > Am I correct or is there something I’m missing?
Hi Juan, I think you've merged the best of the so far posted codes. > On Mar 25, 2017, at 6:38 AM, Thomas Morley <[email protected]> wrote: > > %% 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)))) > ) > > > > best, > > jc > > %%example > > \version "2.19.57" > > > stemBeams = > #(define-music-function (parser location 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/64) > \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] > } > \\ > { > s2 > s8. > \once \override Beam.positions = #'(-5 . -5) > \once \override Score.NoteColumn. X-offset = -1.2 I'm still puzzled why the overrides for Stem.beaming sometimes need postive sometimes negative values. Displaying beam-segments shows only 0,1,2 for vertical-count, i.e positives. \once \override Beam.after-line-breaking = #(lambda (grob) (pretty-print (ly:grob-property grob 'beam-segments))) > \stemBeams #'(0 1 2) #'(0 1) > \stemDown > \once \hide Rest > \stemBeams #'() #'(0 1 2) > r32[ > \stemBeams #'(0 1 2) #'(0 1) > fis'''!32 > \change Staff = "down" > \stemUp > \stemBeams #'(-1 0) #'(-2 -1 0 ) > gis''!32 > \change Staff = "up" > \stemDown > \stemBeams #'(-2 -1 ) #'(-2 -1 ) > 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 s8 s8 > \times 4/5 { gis''16[ dis''! gis''! ais'' b''!] } > \once \override Stem.length = #18 > dis'''! > s8 > } >>> Cheers, Harm _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
