Hi,

On Fri, Oct 31, 2014 at 11:44 AM, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> wrote:

>
>
> but, as you can see, it's limited to one beam... :(
> Any help from schemers ?
>

You could scale the stencil.  That way you wouldn't need to reconstruct the
beam from what you find in 'beaming.  Of course this will only produce good
results with flat beams!

 \version "2.19.15"

beamLength =
#(define-music-function (parser location myLength) (number?)
   (define (myBeamLength grob)
     (let* ((beam (ly:beam::print grob))
            (beam-extent-x (ly:stencil-extent beam X))
            (beam-length-x (interval-length beam-extent-x))
            (new (ly:stencil-scale beam (1+ (/ myLength 100)) 1)))
       new))

   #{
     \once\override Beam.stencil = #myBeamLength
   #})

\relative c' {
  \beamLength #10
  c8[c c c c c c c]
  \stemDown
  \beamLength #6
  c16[c c c c c c c c c c c c c c c]
  \override Staff.BarLine.bar-extent = #'(-7 . 2)
  \beamLength #3
  c32[ c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c]
}

%%%%
Best,
David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to