[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Four Bars per Line/System, again :)
From: |
Janek Warchoł |
Subject: |
Re: Four Bars per Line/System, again :) |
Date: |
Sat, 19 May 2012 11:27:37 +0200 |
David,
a couple of thoughts:
- what about looping the break pattern? I.e. \consists
#(custom-line-breaks-engraver '(2 3 4)) = \consists
#(custom-line-breaks-engraver '(2 3 4 2 3 4 2 3 4 ... 2 3 4))?
- i'm not sure if this is desired or not, but changing current
barNumber confuses your function:
\version "2.15.38"
#(define (custom-line-breaks-engraver bar-list)
(let ((total (1+ (car bar-list)))) ;; not sure why increment necessary
(lambda (context)
(make-engraver
(acknowledgers ((paper-column-interface engraver grob source-engraver)
(let ((current-bar (ly:context-property context 'currentBarNumber)))
(if (and (pair? bar-list)
(= (remainder current-bar total) 0)
(eq? #t (ly:grob-property grob 'non-musical)))
(begin
(set! (ly:grob-property grob 'line-break-permission) 'force)
(if (not (null? (cdr bar-list)))
(begin
(set! bar-list (cdr bar-list))
(set! total (+ total (car bar-list))))
(set! bar-list '())))))))))))
\relative c' {
\set Score.currentBarNumber = #4
c4 c c c c c c c c c c c c2 c
c4 c c c c c c c c c c c c2 c
c4 c c c c c c c c c c c c2 c
}
\layout {
\context {
\Score
\consists #(custom-line-breaks-engraver '(4 4 4)) % the break
occurs after measure with number 4, not after 4 measures
}
}
cheers,
Janek
- Re: Four Bars per Line/System, again :), (continued)
- Re: Four Bars per Line/System, again :), Kieren MacMillan, 2012/05/18
- Re: Four Bars per Line/System, again :), Kieren MacMillan, 2012/05/18
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/18
- Re: Four Bars per Line/System, again :), Kieren MacMillan, 2012/05/18
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/18
- Re: Four Bars per Line/System, again :), Jay Anderson, 2012/05/18
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/18
- Re: Four Bars per Line/System, again :), Kieren MacMillan, 2012/05/18
- Re: Four Bars per Line/System, again :), ole, 2012/05/19
- Re: Four Bars per Line/System, again :), Janek Warchoł, 2012/05/19
- Re: Four Bars per Line/System, again :),
Janek Warchoł <=
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/19
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/19
- Re: Four Bars per Line/System, again :), Janek Warchoł, 2012/05/19
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/19
- Re: Four Bars per Line/System, again :), Johan Vromans, 2012/05/19
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/19
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/20
- Re: Four Bars per Line/System, again :), Thomas Morley, 2012/05/21
- Re: Four Bars per Line/System, again :), David Nalesnik, 2012/05/21
Re: Four Bars per Line/System, again :), Federico Bruni, 2012/05/19