lilypond-user
[Top][All Lists]
Advanced

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

Re: how to get half-bar used in Bach Music?


From: jakob lund
Subject: Re: how to get half-bar used in Bach Music?
Date: Mon, 22 Nov 2010 16:30:45 +0100

Ok here's another ugly hack:

<example>

#(define __x 1)

{
\override Staff . BarLine #'bar-size = #(lambda (G) (set! __x (1+
__x)) (+ 2 (* 2 (modulo __x 2))))

\relative c'' { c1 c c c c }
}

</example>

It's ugly because it uses a `global' variable __x to count the bars
and set the bar size to 2 only after an odd number of bars. It screws
up if you try to use it with more staffs.

If someone who knows the inner workings of scheme in Lilypond reads
this, I would like to know
 how to properly access the current bar number in the callback!???


Jakob.


2010/11/22 Alexander Kobel <address@hidden>:
> [ with cc to lilypond-user; please keep the discussions on the mailing list,
> others might have the same problems and can find the solutions in the
> mailing list archives ]
>
> On 2010-11-22 12:38, Martin Kemp wrote:
>>
>> I've just been struggling with this too. All else having failed, I faked
>> it by using an invisible bar line and adding:
>>
>> \once \override TextScript #'extra-offset = #'(-1 . 3.5) c8_\markup {
>> \musicglyph #"rests.M2mensural" }
>
> Woah, that's some ugly hack...
> Again, I don't see the need for this - I just tested the following, and it
> works just perfect for me (use \halfBar to make a "real" bar line at the end
> of a measure appear smaller, and \halfAddBar to insert a "fake" barline of
> half the usual extent).  If it doesn't in your setting, could you give a
> small compiling example to show the problem?
>
> halfBar = \once \override Staff . BarLine #'bar-size = #2
> halfAddBar = { \halfBar \bar "|" }
>
> \relative c' {
>  c4 c \halfAddBar c c \halfBar |
>  c c c c |
> }
>
>
> Cheers,
> Alexander
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>



reply via email to

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