[Top][All Lists]

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

Re: Has piano pedal brackets end on the right of a note column. (issue 4

From: Mike Solomon
Subject: Re: Has piano pedal brackets end on the right of a note column. (issue 4899050)
Date: Fri, 19 Aug 2011 10:14:29 +0200

On Aug 19, 2011, at 9:51 AM, Keith OHara wrote:

> You mean your new 'bound-alignment-interfaces.  I didn't follow issue 620, 
> but looking now I don't see how it helps.  We would want to find the left 
> extent of the note-heads in the main note column, excluding suspended 
> note-heads.  (Actually, I think that is the x-reference point for the 
> NoteColumn)

Imagine that bound interfaces were not a list but rather a lazy alist of 
interfaces and callbacks.  For example:

`((clef-interface . ,my-clef-interface-callback) (key-signature-interface . 
,(ly:simple-closure ,my-key-signature-callback-that-needs-an-extra-argument 1)) 

Lazy alist because it can also contain non-pairs, in which case a default 
extent callback along a given axis is used as the callback.

The axis group interface recurses through this list, applying the callback to 
grobs that contain interfaces in the alist to get the extent of that grob 
according to the callback.

So, now, say that you want to align to a note column a particular way for 
piano-pedal-brackets.  The bound-alignment-interfaces alist would look like:

`((note-column-interface . 

And my-note-column-callback would be something to the effect of:

#(define (my-note-column-callback-specific-to-piano-pedal-brackets grob) 

This seems swiss-army-knife tweakable: it generalizes the problem of finding 
different extents for the same grob depending on the grob that needs to be 
aligned by rolling all extent-finding callbacks into an alist (not unlike the 
concept of grob properties in the first place).


reply via email to

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