lilypond-user
[Top][All Lists]
Advanced

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

Re: Beaming until barline


From: David Nalesnik
Subject: Re: Beaming until barline
Date: Fri, 31 Oct 2014 14:39:38 -0500

Hi,

On Fri, Oct 31, 2014 at 11:44 AM, Pierre Perol-Schneider <address@hidden> 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


reply via email to

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