lilypond-user
[Top][All Lists]
Advanced

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

Re: Line breaks in polymetric music


From: Lukas-Fabian Moser
Subject: Re: Line breaks in polymetric music
Date: Mon, 1 Jun 2020 10:14:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Hi Mark and Sami,

Basically, there can only be a line-break on a note or rest boundary. So the 
approach is:

1. Decide where you want the break, say in this example halfway through the 
second 4/8 bar

2. Split the note at that point into two, you will have to do the maths to make 
this work. It might look like { c4*3/7 c4*4/7 }

3. Hide the second of these notes { c4*3/7 \once \hideNotes c4*4/7 }

I think it might be better to use a spacing rest instead of \hideNotes (since the \hidden note will take up space):

c4*3/7 s4*4/7

This also has the advantage not to kill \tie's etc., and the break point does not have to be at the exact correct position since spacer rests are breakable.

This might even be turned into a music function:

\version "2.20.0"

brkbl =
#(define-music-function (pitch dur) (ly:pitch? ly:duration?)
   (let* ((len (ly:duration-log dur))
          (dotcount (ly:duration-dot-count dur))
          (factor (ly:duration-scale dur))
          (spacer-dur (ly:make-duration len dotcount (- 1 factor))))
   #{
     $pitch $dur
     s $spacer-dur
   #}))

<<
\new Staff {
  % Total duration will be 4, split in two parts:
  % a4*1/7 s4*6/7
  \brkbl a4*1/7

  a4 a
}
\new Staff \transpose c c' {
  \override Beam.breakable = ##t
  c8*2/7[ d e f g \bar "" \break a b]
  c[ d e f g a b]
  c[ d e f g a b]

}
>>

But note that this function is very primitive and does not accept chords (it could be made to if necessary).




reply via email to

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