lilypond-user
[Top][All Lists]
Advanced

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

TIP] Scheme function to force regular system breaks (Kieren MacMillan)


From: Frederick Dennis
Subject: TIP] Scheme function to force regular system breaks (Kieren MacMillan)
Date: Fri, 28 Aug 2009 17:54:36 +0430



Thanks, Kieren. Added to the archives.


Thought I'd share this... it's a Scheme function I wrote to force
system breaks at regular intervals (e.g., four measures per system is
a popular jazz sheet music layout).
Comments/improvements are welcome.

Hope this helps someone else!
Kieren.
________________

\version "2.13.3"

breakSet =
  #(define-music-function
    (parser location measureDuration perSystem systemReps)
    (ly:music? number? number?)
    #{
      \repeat "unfold" $systemReps {
        \repeat "unfold" $perSystem { $measureDuration \noBreak }
        \break
      }
    #})

theMusic = { \repeat "unfold" 80 c''4 }

\markup \wordwrap { This is the default layout for 90 quarter notes: }
\score { \theMusic }

\markup \fill-line { "" }
\markup \wordwrap { Using the \typewriter "\breakSet" function, we
can easily force equal systems of four measures each: }

\score {
  \new Staff << \theMusic \breakSet s1 #4 #5 >>
}






reply via email to

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