[Top][All Lists]

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

Re: [LSR - v2.18] "Displaying bar numbers on a separate staff"

From: Pierre Perol-Schneider
Subject: Re: [LSR - v2.18] "Displaying bar numbers on a separate staff"
Date: Fri, 14 Feb 2014 21:02:42 +0100

2014-02-14 20:56 GMT+01:00 Robin Bannister <address@hidden>:

> If you are referring to the horizontal distortion,
> this is cured by prefixing the extra-spacing-width
> override with "Staff.".
Thanks Robin.
In fact but I was more concern by the long comments :

%% Store the following until
%%   %% end of include file
%% as BarNumberStaff-1.0.ily.
%% To use it in your projects, write
%%   \include "<path-to-file/>BarNumberStaff-1.0.ily"
%% to define the BarNumberStaff context described below.
%% Cheers,
%%   Alexander

%% BarNumberStaff
%% Version 1.0
%% 2009, Alexander Kobel (www.a-kobel.de)

%% Defines the
%%   BarNumberStaff
%% context, to be used as a more prominent measure counter
%% in between of staff groups in large scores.
%% To use it, insert
%%   \new BarNumberStaff { ... }
%% into your score, where { ... } is a combination of
%% MultiMeasureRests, RehearsalMarks and optionally skips and
%% attached TextScripts.
%% Every MultiMeasureRest is translated to the bar number of
%% the current measure, RehearsalMarks and TextScripts are
%% printed as usual.

%% This should also work with older versions, probably up
%% to <= 2.10. Please report if this is the case.
%% However, note that Joe Neeman's new vertical spacing
%% algorithm greatly improves the default influence of a
%% BarNumberStaff to the overall score layout, thus version
%% >= 2.13.x is recommended (see lines 213 - 231).
%\version "2.14.0"

%% Internals
%% BarNumberStaves use MultiMeasureRests to render bar numbers.
%% The underlying concept is as follows:
%% A global measure counter is initialized to 0.
%% Conceptually, each time a MultiMeasureRestNumber is rendered, the
%% global measure counter is examined, incremented, and used as 'text.
%% To handle compressed full measure rests, the 'text callback of
%% MultiMeasureRestNumber hijacks the 'measure-count property of the
%% parental MultiMeasureRest to know how many bars have been compressed.
%% To allow several scores per file, or several BarNumberStaves per score,
%% without forcing the user to reset the global counter or initialize
%% several 'text callbacks per BarNumberStaff, the callback further
%% checks the 'when moment of the NonMusicalPaperColumn of the rest,
%% and stores both the moment and the respective bar number in another
%% global variable. If a moment before the cached value is encountered,
%% a new score is assumed and the global state is reset. If the same
%% moment is encountered, another BarNumberStaff calls the bar number
%% at the same position, so the increment of the global measure counter
%% has already been done.


reply via email to

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