2015-05-15 8:49 GMT+02:00 Murray-Luke Peard <murrayluke.pe...@gmail.com>:
> Actually, I've found an unintended consequence of this method, in that it > changes the bar for all staves, not just the one in question. See the > circle in the graphic below - all bar lines at this point were changed, not > just the top line > Yep. The \bar "whatever" - command is applied to the whole score. To get a different bar-line in only one Staff of Score you have to set the whichBar-property accordingly. Like the code below (using a second Voice for controlling, as Simon suggested already): m = { \time 3/2 \repeat unfold 3 { c''1 } } ctrl = { \repeat unfold 2 { s1. \bar "b" } } ctrl¹ = { s1. \once \set Staff.whichBar = "S" s \once \set Staff.whichBar = "|" } << \new Staff << \m \ctrl >> \new Staff << \m \ctrl¹ >> \new Staff \m \new Staff \m >> > (and what's going on with the bottom line, I don't know). > No idea what's causing it. Could you provide a tiny example? > [image: Inline images 1] > > > M-L > > On Fri, 15 May 2015 at 10:57 Murray-Luke Peard <murrayluke.pe...@gmail.com> > wrote: > >> This is the solution that worked for me. One problem I had was that if >> the note goes over a bar line (as in the first example), the bar line is >> drawn before you specify the bar type, and you get two bar lines (see >> second example). >> >> In the third example, I set the defaultBarType before specifying the >> note, which causes the right bar line to be drawn. Then I set it back >> again. It's a bit fiddly, but the result is exactly what I'm looking for. >> >> -- >> % setup as before in the previous email >> { >> % without any changes to bar lines >> \time 3/2 >> a'1 b' c'' >> } >> >> { >> % draw bar line with specific type (get two bar lines, as the b' causes >> a bar line to be drawn as well >> \time 3/2 >> a'1 b' \bar "b" c'' >> } >> >> % shortcuts >> fullBar = { \set Timing.defaultBarType = "|" } >> splitBar = { \set Timing.defaultBarType = "b" } >> >> { >> % set default bar line before drawing b', then set it back again >> \time 3/2 >> a'1 \splitBar b' \fullBar c'' >> } >> >> >> The result looks like this: >> >> >> Where the last one is what I was aiming for. >> >> Thanks everyone for your help! >> > Btw, I'd prefer you'd attach images. Per default, I always filter in-line images, maybe others as well. Or give a hint that inline-images are present, then I'll look up your mail in the archives. Thanks. > >> Murray-Luke >> >> >> On Thu, 14 May 2015 at 20:41 Thomas Morley <thomasmorle...@gmail.com> >> wrote: >> >>> 2015-05-14 8:51 GMT+02:00 Alexander Kobel <n...@a-kobel.de>: >>> > On 2015-05-14 05:09, Murray-Luke Peard wrote: >>> >> >>> >> [...] >>> >> One is to use the Mensurstriche layout, which has bar lines between >>> >> staves but not through them. My preferred option is to move the >>> barline >>> >> up or down if the note is low or high, and split it if the note is in >>> >> the middle. >>> >> >>> >> I've been able to move the barline up and down with the following >>> >> commands: >>> >> >>> >> upBar = { \override Staff.BarLine #'bar-extent = #'(0.5 . 3) } >>> >> downBar = { \override Staff.BarLine #'bar-extent = #'(-3 . -0.5) } >>> >> >>> >> And reset it to normal with >>> >> >>> >> fullBar = { \override Staff.BarLine #'bar-extent = #'(-2 . 2) } >>> >> >>> >> But I can't figure out how to get the split bar line. Ideally, it >>> would >>> >> look something like : >>> >> >>> >> topPart = { \override Staff.BarLine #'bar-extent = #'(2 . 3) } >>> >> bottomPart = [ \override Staff.BarLine #'bar-extent = #'(-3 . -2) } >>> >> >>> >> but both at the same time! >>> >> >>> >> Can anyone suggest how I might achieve this? >>> > >>> > >>> > >>> > Hi Murray-Luke, >>> > >>> > I had the exact same problem a few days ago, in a different context >>> (read >>> > the thread "TimeSignatures over BarLines" from May 07 here: >>> > <http://lists.gnu.org/archive/html/lilypond-user/2015-05/msg00276.html >>> >). >>> > The problem is that the BarLine is drawn only once, and the most recent >>> > extent is taken. There is a solution however: to draw the short BarLine >>> > twice, and move one of the instances as necessary. The code is as >>> follows: >>> > >>> > \once \override Staff.BarLine #'stencil = >>> > #(lambda (grob) >>> > (ly:grob-set-property! grob 'bar-extent '(-3 . -2)) >>> > (ly:stencil-add >>> > (ly:bar-line::print grob) >>> > (ly:stencil-translate-axis (ly:bar-line::print grob) 5 Y))) >>> > >>> > If you want two stubs of different length, you have to work a little >>> bit >>> > harder, but this should get you started. >>> > >>> > >>> > HTH, >>> > Alexander >>> >>> >>> Hi Murray-Luke, >>> >>> alternatively you could define your own bar-lines, leading to: >>> >>> \version "2.19.18" >>> >>> #(define (make-up-tick-bar-line grob extent) >>> (let* ((line-thickness (layout-line-thickness grob)) >>> (thickness (* (ly:grob-property grob 'hair-thickness 1) >>> line-thickness)) >>> (staff-space (ly:staff-symbol-staff-space grob)) >>> (height (interval-end extent))) >>> >>> (ly:round-filled-box (cons 0 thickness) >>> (cons height (+ height staff-space)) >>> 0))) >>> >>> #(define (make-down-tick-bar-line grob extent) >>> (let* ((line-thickness (layout-line-thickness grob)) >>> (thickness (* (ly:grob-property grob 'hair-thickness 1) >>> line-thickness)) >>> (staff-space (ly:staff-symbol-staff-space grob)) >>> (bottom (interval-start extent))) >>> >>> (ly:round-filled-box (cons 0 thickness) >>> (ordered-cons bottom (- bottom staff-space)) >>> 0))) >>> >>> #(define (make-both-tick-bar-line grob extent) >>> (ly:stencil-add >>> (make-up-tick-bar-line grob extent) >>> (make-down-tick-bar-line grob extent))) >>> >>> >>> >>> #(add-bar-glyph-print-procedure "u" make-up-tick-bar-line) >>> #(define-bar-line "u" "u" #f #f) >>> >>> #(add-bar-glyph-print-procedure "d" make-down-tick-bar-line) >>> #(define-bar-line "d" "d" #f #f) >>> >>> >>> #(add-bar-glyph-print-procedure "b" make-both-tick-bar-line) >>> #(define-bar-line "b" "b" #f #f) >>> >>> %%%%%%%%%%%%%%%%%% >>> %% EXAMPLE >>> %%%%%%%%%%%%%%%%%% >>> >>> { >>> r1 \bar "u" r \bar "u" \break >>> r \bar "d" r \bar "d" \break >>> r \bar "b" r \bar "b" \break >>> } >>> >>> >>> >>> >>> HTH, >>> Harm >>> >> Cheers, Harm
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user