Hi Jay,

On Mon, Sep 29, 2014 at 3:42 AM, Jay Vara <j...@diljun.com> wrote:

> Hi David,
>
> Thank you very much.  Now I know how to use the listeners!
>
> With your change it seems to work for the two-staff example with (7 4) (1
> 4) (2 4) meter. This is the only case of compound metre that I commonly use
> that has a (1 4) as one of the components.
>
> Just to be sure, I did check a few other metres, and whenever there is a
> (1 4) an issue is possible. Typically the problems seem to be in the first
> few measures. For example, the two staff example with meter = #'((1 4) (2
> 4)) gives the following.
>
>
True, it does break down.  I strongly suspect that the issue is one of
timing.  Perhaps measureLength is being changed too late in the game for
the Completion_heads_engraver to make use of it as you would like.

I wonder about the approach here.  You are wanting to feed a series of
algorithmically generated durations into LilyPond and have it return
rhythms which are adjusted to fit within a given meter, such that durations
are split across barlines and durations are split across the sub-bar units
specified by the meter.  You would like to have the sub-bars marked by
regular barlines and the ordinary bars replaced by double barlines.

If I'm understanding this correctly, I see two issues:

(1) The standard way to notate this would be with dotted barlines within
the measures, which are separated by standard barlines,

(2) Resetting measureLength messes up measure numbering.

It should not be too difficult to achieve the sub-bars--add this type of
barline every so many moments.

The problem is that the Completion_heads_engraver and the
Completion_rests_engraver do not appear to respond to sub-bar patterning,
as the following snippet demonstrates:

\version "2.18.0"

musicA = {
  \compoundMeter #'((3 2 16))
  \relative c' {
    c8 d e f g
    r8 r r r r
  }
}

\score {
  \new Staff \musicA
  \layout {
    \context {
      \Voice
      \remove Note_heads_engraver
      \remove Rest_engraver
      \consists Completion_heads_engraver
      \consists Completion_rest_engraver
    }
  }
}

I would need to spend more time with lily/completion-noteheads-engraver.cc
to understand what goes on there, but  a comment at the head of the file
suggests that my snippet should work:

"Every time process_music () is called and there are note events, we figure
out how long the note to typeset should be.  It should be no longer than
what's specified, than what is left to do and it should not cross barlines
or sub-bar units."

The gist is, I don't know if it's possible to do what you'd like to do
without fixing or enhancing the C++ engravers.

--David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to