Re: Begin with a staff bar at left edge
2011/9/14 Neil Puttock n.putt...@gmail.com: 2011/9/14 Janek Warchoł janek.lilyp...@gmail.com: Why shouldn't it be controlled by break-visibility? See output-lib.scm, bar-glyph-alist and bar-line::calc-glyph-name. Ah, i see! So the barline is affected by break-visibility, but the stencil is empty in case of using \bar | at the beginning of the line, isn't it? So, \bar |s should do the trick? ...hmm, it doesn't work in the first measure, see: { \bar |s s1 \break \bar |s s1 \break \bar |s s1 \break } i think it's a bug? Also, should we add something like (|hard . (| . |)) to output-lib.scm? cheers, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/21 Janek Warchoł janek.lilyp...@gmail.com 2011/9/14 Neil Puttock n.putt...@gmail.com: 2011/9/14 Janek Warchoł janek.lilyp...@gmail.com: Why shouldn't it be controlled by break-visibility? See output-lib.scm, bar-glyph-alist and bar-line::calc-glyph-name. Ah, i see! So the barline is affected by break-visibility, but the stencil is empty in case of using \bar | at the beginning of the line, isn't it? So, \bar |s should do the trick? ...hmm, it doesn't work in the first measure, see: { \bar |s s1 \break \bar |s s1 \break \bar |s s1 \break } i think it's a bug? Also, should we add something like (|hard . (| . |)) to output-lib.scm? cheers, Janek Hi Janek, I don't think it's a bug, but the default behaviour. It's possible to change with: \version 2.14.2 #(define my-bar-glyph-alist '((|s . (| . | #(define (my-bar-line::calc-glyph-name grob) (let* ((index-cell (lambda (cell dir) (if (equal? dir 1) (cdr cell) (car cell (glyph (ly:grob-property grob 'glyph)) (dir (ly:item-break-dir grob)) (result (assoc glyph my-bar-glyph-alist)) (glyph-name (if (= dir CENTER) glyph (if (and result (string? (index-cell (cdr result) dir))) (index-cell (cdr result) dir) #f))) ) glyph-name)) bars = { \once \override Staff.BarLine #'glyph-name = #my-bar-line::calc-glyph-name \bar |s } { \override Staff.Clef #'stencil = ##f \override Staff.TimeSignature #'stencil = ##f \bars a1 \break \bars a1 \break \bars a1 } %{ { \bar |s a1 \break \bar |s a1 \break \bar |s a1 } %} Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/21 Thomas Morley thomasmorle...@googlemail.com: Hi Janek, I don't think it's a bug, but the default behaviour. It's possible to change with: \version 2.14.2 #(define my-bar-glyph-alist '((|s . (| . | #(define (my-bar-line::calc-glyph-name grob) (let* ((index-cell (lambda (cell dir) (if (equal? dir 1) (cdr cell) (car cell (glyph (ly:grob-property grob 'glyph)) (dir (ly:item-break-dir grob)) (result (assoc glyph my-bar-glyph-alist)) (glyph-name (if (= dir CENTER) glyph (if (and result (string? (index-cell (cdr result) dir))) (index-cell (cdr result) dir) #f))) ) glyph-name)) Interesting. However, I don't have any idea how it achieves its goal... i think it would be better if \bar |s simply worked in case of measure 1 too. Nevertheless, thank you for sending this! cheers, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/21 Janek Warchoł janek.lilyp...@gmail.com: So, \bar |s should do the trick? ...hmm, it doesn't work in the first measure, see: { \bar |s s1 \break \bar |s s1 \break \bar |s s1 \break } i think it's a bug? Did you see the warning message? You haven't instantiated a Staff context, so the first \bar command is ignored. - warning: cannot find or create `Timing' called `' This works fine: \new Staff { \bar |s s1 \break \bar |s s1 \break \bar |s s1 \break } Cheers, Neil ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/21 Neil Puttock n.putt...@gmail.com: 2011/9/21 Janek Warchoł janek.lilyp...@gmail.com: So, \bar |s should do the trick? ...hmm, it doesn't work in the first measure, see: { \bar |s s1 \break \bar |s s1 \break \bar |s s1 \break } i think it's a bug? Did you see the warning message? You haven't instantiated a Staff context, so the first \bar command is ignored. - warning: cannot find or create `Timing' called `' This works fine: \new Staff { \bar |s s1 \break \bar |s s1 \break \bar |s s1 \break } Wow! Thanks! Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
On 14 September 2011 21:30, Xavier Scheuer x.sche...@gmail.com wrote: What I'd like to get but I did not managed to is to begin the staff with a _normal bar_ ( \bar | ) at the left edge (because these measures are to be inserted in the middle of an existing [scanned] score). I tried to modify the place of staff-bar in Score.BreakAlignment #'break-align-orders but I am not able to print a normal bar at the extreme left of the staff (left edge). Would you have some advice ? Use a SystemStartBar instead (with collapse-height overridden). Cheers, Neil ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/14 Neil Puttock n.putt...@gmail.com: On 14 September 2011 21:30, Xavier Scheuer x.sche...@gmail.com wrote: What I'd like to get but I did not managed to is to begin the staff with a _normal bar_ ( \bar | ) at the left edge (because these measures are to be inserted in the middle of an existing [scanned] score). I tried to modify the place of staff-bar in Score.BreakAlignment #'break-align-orders but I am not able to print a normal bar at the extreme left of the staff (left edge). Would you have some advice ? Use a SystemStartBar instead (with collapse-height overridden). Interesting, shouldn't \override Staff.BarLine #'break-visibility = #'#(#t #t #t) solve Xavier's problem? Should i report this as a bug? cheers, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
On 14 September 2011 22:42, Neil Puttock n.putt...@gmail.com wrote: Use a SystemStartBar instead (with collapse-height overridden). Yeah! Thank you for this quick answer. SystemStartBar did not come into my mind! It is indeed a simple and efficient solution (I increased the thickness of SystemStartBar from #1.6 to #1.9 so it looks like a real bar line). Thank you very much! Cheers, Xavier -- Xavier Scheuer x.sche...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/14 Janek Warchoł janek.lilyp...@gmail.com: Interesting, shouldn't \override Staff.BarLine #'break-visibility = #'#(#t #t #t) solve Xavier's problem? Should i report this as a bug? No. An ordinary barline isn't allowed at the start of a system. Cheers, Neil ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/14 Neil Puttock n.putt...@gmail.com: 2011/9/14 Janek Warchoł janek.lilyp...@gmail.com: Interesting, shouldn't \override Staff.BarLine #'break-visibility = #'#(#t #t #t) solve Xavier's problem? Should i report this as a bug? No. An ordinary barline isn't allowed at the start of a system. Why shouldn't it be controlled by break-visibility? cheers, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Begin with a staff bar at left edge
2011/9/14 Janek Warchoł janek.lilyp...@gmail.com: Why shouldn't it be controlled by break-visibility? See output-lib.scm, bar-glyph-alist and bar-line::calc-glyph-name. Cheers, Neil ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user