[Top][All Lists]

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

Re: [PATCH] Clusters

From: Han-Wen Nienhuys
Subject: Re: [PATCH] Clusters
Date: Sun, 17 Nov 2002 23:23:08 +0100

address@hidden writes:
> On Sat, 16 Nov 2002, Han-Wen Nienhuys wrote:
> > ...
> >    Better yet, simply store a list of note heads in the cluster grob,
> >    and let the Cluster grob sort out X and Y-positions. [*]
> >
> >  * The contents of columns_scm are not protected from Garbage
> >    collection. Your code will make mysterious ugly crashs on larger
> >    scores. Use Protected_scm, or better yet, use [*]
> If I put all note heads in the cluster grob, then, if the spanner is
> broken, how do I determine which of these note heads are in the current
> broken piece of the spanner, if not using columns_scm?

The list is pruned automatically. This happens for slurs and various
other spanners as well. Besides, columns_scm happens in interpreting,
which is well before linebreaks are calculated.

> The addditional points B an C as synthesized by the engraver now give me
> pairs (a,f), (b,B), (c,C), (d,e), and the polygon is now uniquely defined
> by travelling through the first element of each pair (from the leftmost
> pair to the rightmost), then through the second element (from right to
> left) back to the first, i.e. a-b-c-d-e-C-B-f-a.
> I do not have this information in the backend if I use note heads instead
> of pitches, unless I create additional dummy note heads for B and C, that
> just serve for storing x/y coordinates (and possibly may corrupt other
> things such as ties or midi output?).  Should I really do such a hack?
> In other words, the shape of the polygon is not determined by the
> coordinates of a set of note head grobs.  Rather, I think a set of min/max
> pairs has to be computed by musically interpreting note-events and be
> passed to the backend.  Of course, I do not need to pass pitches to the
> backend, but may pass rather the difference in pitch (i.e. height).

I would think that the list of note-head grobs would be broken up into
chunks containing the note heads that belong to the same column. Then
you can take the minimum and maximum Y coordinate for each chunk, and
run the polygon through all minimums first, and then through all

I don't understand your argument about minimums and maximums, since
min and max are being reset at each time-step. Storing the noteheads
at each time step gives just as much information.

Han-Wen Nienhuys   |   address@hidden   | 

reply via email to

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