bug-lilypond
[Top][All Lists]
Advanced

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

Re: Bar number on odd bars does not work on new release?


From: David Kastrup
Subject: Re: Bar number on odd bars does not work on new release?
Date: Sat, 18 Jan 2014 23:03:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

James <address@hidden> writes:

> On 06/01/14 20:47, Federico Bruni wrote:
>> 2014/1/6 Esa Erola <address@hidden>
>>
>>>
>>> The snippet putting bar numbers on odd bars does not seem to work on 2.16.0
>>> - it worked on an earlier release
>>>
>>>
>>> \context {
>>>      \Score
>>>      barNumberVisibility = #all-bar-numbers-visible
>>>      barNumberVisibility = #(lambda (n) (= (modulo n 2) 1))

barNumberVisibility = #(modulo-bar-number-visible 2 1)

modulo-bar-number-visible has been available since LilyPond 1.7.9 (I'm
not kidding), so it should be safe to replace this in the LSR.

>>   Interpreting music...lily-library.scm: In expression (process-procedure
>> book paper ...):
>> lily-library.scm: Wrong number of arguments to #<procedure #f (n)>
> The offending line is
>
>     barNumberVisibility = #(lambda (n) (= (modulo n 2) 1))
>
> If you comment that out it works (or rather the file compiles but you
> don't get the output you want). That doesn't help anyone, but shows
> where the problem line is.

Well, this change was done in 2.15.22, commit
commit 123b51c50a462b14d3cbffe2f354eaa8ec772dc2
Author: Mike Solomon <address@hidden>
Date:   Mon Dec 12 21:33:17 2011 +0100

    Makes bar numbering formatter a scheme function.

This is
<URL:http://code.google.com/p/lilypond/issues/detail?id=460>

The side effect of the change in the function arguments is not mentioned
explicitly.  The reviewed patch does not even fix the description of the
function, though the committed patch does.

There has been no convert-ly rule added to deal with this
incompatibility.  It is conceivable to fix assignments of the

barNumberVisibility = #(lambda (arg) ...

variety through it is not clear how many cases will be successfully
addressed by that.  At least the LSR would have benefited, but it can be
rewritten using modulo-bar-number-visible anyway.

It would also have been possible to do most of the changes in
<URL:https://codereview.appspot.com/5452057/diff/10001/scm/translation-functions.scm>
automatically, but again this would raise the question how much sense
that would have made.

-- 
David Kastrup




reply via email to

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