lilypond-user
[Top][All Lists]
Advanced

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

Re: Beaming until barline


From: Pierre Perol-Schneider
Subject: Re: Beaming until barline
Date: Fri, 31 Oct 2014 17:44:15 +0100

Hi Gilberto,

Well, I've found this :

\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))
           (beam-thickness (ly:grob-property grob 'beam-thickness))
           (beam-positions (ly:grob-property grob 'positions))
           (mrkp (markup #:beam (* beam-length-x (+ 1 (/ myLength 100)))
                   0 beam-thickness))
           (new-Beam (ly:stencil-translate-axis
                         (ly:stencil-translate-axis
                           (grob-interpret-markup grob mrkp) -0.025 X) 
                         (car beam-positions)
                         Y))) new-Beam))
  #{
    \once\override Beam.stencil = #myBeamLength
  #})

\relative c' {
  \beamLength #10
  c8[c c c c c c c]
  \stemDown
  %% limitation: shows only one beam
  \beamLength #6
  c16[c c c c c c c c c c c c c c c]
  \once\override Staff.BarLine.bar-extent = #'(-7 . 2)
}


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

reply via email to

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