Forcing line breaks without changing bar lines

3 messages
Open this post in threaded view
|
Report Content as Inappropriate

Forcing line breaks without changing bar lines

 Is it possible to make a function that will do the equivalent of...  \breakwhen at a bar boundary, and  \bar "" \breakotherwise?Basically, I just want a line break at a point, without lilypond fussing about whether the break is at a valid position or not, but I also don't want to erase any bar lines (which happens if I just indiscriminately use \bar "" \break).Thanks,lj _______________________________________________ lilypond-user mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/lilypond-user
Open this post in threaded view
|
Report Content as Inappropriate

Re: Forcing line breaks without changing bar lines

 Li Jie Wong <[hidden email]> writes: > Is it possible to make a function that will do the equivalent of... > >   \break > > when at a bar boundary, and > >   \bar "" \break > > otherwise? > > Basically, I just want a line break at a point, without lilypond fussing > about whether the break is at a valid position or not, but I also don't > want to erase any bar lines (which happens if I just indiscriminately use > \bar "" \break). Not sure this is the best way: it seems sort of hackish. maybeBreak = \context Score \applyContext #(lambda (c)                 (if (not (string? (ly:context-property c 'whichBar)))                  (set! (ly:context-property c 'whichBar) ""))) {   r8   \repeat unfold 40 { r4 \bar "|" \maybeBreak r2 \maybeBreak r4 }   r2.. | \bar "|." } -- David Kastrup _______________________________________________ lilypond-user mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/lilypond-user
Open this post in threaded view
|
Report Content as Inappropriate

Re: Forcing line breaks without changing bar lines

 Thanks! It works perfectly :)On Tue, 6 Jun 2017 at 01:57 David Kastrup <[hidden email]> wrote:Li Jie Wong <[hidden email]> writes: > Is it possible to make a function that will do the equivalent of... > >   \break > > when at a bar boundary, and > >   \bar "" \break > > otherwise? > > Basically, I just want a line break at a point, without lilypond fussing > about whether the break is at a valid position or not, but I also don't > want to erase any bar lines (which happens if I just indiscriminately use > \bar "" \break). Not sure this is the best way: it seems sort of hackish. -- David Kastrup _______________________________________________ lilypond-user mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/lilypond-user