| Re: [frogs] New frog in an empty pond? | 
[ Thread Index | 
Date Index
| More lilynet.net/frogs Archives
] 
Quoting "mike@xxxxxxxxxxxxxxxx" <mike@xxxxxxxxxxxxxxxx>:
Hey Pavel,
Thanks for your patience - I'm a bit short on time these days so I   
can only give feedback in chunks, but I'll try to make it as   
comprehensive as I can.
The ideal UI for something like this is to be able to do:
a8 [ <\change Staff = "foo" a \change Staff = "bar" a \change Staff   
= "other" a > a8 ]
Yes, that the best solution, as it would make Lilypond know that the  
notes belong to one chord.
There are five main issues that will present themselves:
1) Implementing the iterator that will handle the change events.
2) Finding out how to get information to the correct staff contexts.
3) Either expanding NoteColumn to be able to cross staves or create   
NoteColumnColumn that works like SpanBar in collecting NoteColumns   
that belong to the same chord.  The former is undoubtedly more   
difficult but likely a better approach.
4) Expand the algorithms in note-collision.cc to work across staves.
5) Allow a beam to fall in the middle of a cross-staff chord.
I'd work on them in this order.  1-4 seem necessary in order to   
integrate this into LilyPond whereas 5 can be done in a subsequent   
patch.
Some hints for how to proceed:
1)  Copy logic from change-iterator.cc into event-chord-iterator.cc.
2)  Look at auto-beam-engraver,cc and span-bar-stub-engraver.cc to   
see how information can be passed around different contexts.
3)  Look at span-bar.cc to see how grobs can group together objects   
that fall on different staves and see how this can be applied to   
note-column.cc.
4) and 5) will come after 1,2, and 3.  You'll already have your work  
 cut out for you with 1, 2, & 3.  E-mail me with any questions for   
what things mean in these files!
I think I'll try it soon.
However, I would prefer to spend some time on the current approach  
(extending the stems).  If I succeed, I'll be able to provide a  
stopgap solution for everybody that would work with Lilypond 2.16 and  
maybe even 2.14.  Even if I don't succeed, I'll expand my knowledge of  
Scheme and Lilypond internals.
As I understand, I need to make a grob that is typeset after stems.   
It could be a separate grob, such as an arpeggio.  Alternatively, I'll  
try to make one stem a parent of the other one.
Let me play with it a little bit.  Then I'll be more confident with  
the C++ code.
--
Regards,
Pavel Roskin
--
----
Join the Frogs!