lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add tab-tie-follow-engraver (issue2723043)


From: Marc Hohl
Subject: Re: Add tab-tie-follow-engraver (issue2723043)
Date: Sat, 13 Nov 2010 11:18:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10

Am 13.11.2010 06:21, schrieb address@hidden:
Thanks for the help on the null pointer.  I was thinking that it was
some *other* kind of variable than a Grob, and that I was casting it
wrong.

Got that all taken care of -- no scheme calls at all.

On 2010/11/12 17:40:42, Neil Puttock wrote:

It's back to square one though, isn't it?

The triple nested loop is horrible, and should be avoided at all
costs; this is
partly why I suggested only acknowledging the ties and heads.

OK, so now I've eliminated the triple nested loop.

There is what appears to me to be a required nested loop.

One loop to loop through the note-heads.
Then an inner loop (with a break) through the ties looking for a tie on
a note head.
Followed by a second inner loop (with a break) through the slurs looking
for a slur on the note head.
Followed by a third inner loop (if we didn't find a slur) through the
glissandos looking for a glissando on the note head.

I can think of no way to simplify this code further.  If you have any
ideas I'd be happy to hear them.
There was the idea to include this into the Tab_note_heads_engraver, and if it were possible to include the parenthesize stuff into that engraver as well, it would

a) simplify the callbacks
b) solve the problem about the harmonic brackets

Is it possible to detect the tie/slur/glissando cases within the engraver and call a routine to parenthesize the fret number? Then the resulting grob is a compound object that gets its angle brackets displayed correctly without fiddling with padding and stuff.

Marc


Thanks,

Carl


http://codereview.appspot.com/2723043/





reply via email to

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