vexflow icon indicating copy to clipboard operation
vexflow copied to clipboard

Support cross staff chords

Open Silverwolf90 opened this issue 9 years ago • 3 comments

image

Silverwolf90 avatar Aug 28 '16 15:08 Silverwolf90

I think we could treat this as multiple distinct StaveNotes and add some mechanism to connect the stems.

0xfe avatar Aug 28 '16 18:08 0xfe

While a good graphical solution, representing this single StaveNote as two independent StaveNotes puts a big burden on Voice construction by requiring extra voices with complementary GhostNotes.

In my experience, a cross-staff chord is not a particularly more complicated case than a single staff chord -- the codepath for both would ideally be nearly, if not completely, identical. Noteheads already have a setStave method, which is set to the same stave as the parent StaveNote when setStave is called. There's also logic in places that assume that all noteheads are on the same staff, but taking into account potentially different staves doesn't complicate things much.

I'd guess that if stems were a bit bit smarter, formatting occurred in consistent parts of the lifecycle, and the StaveNote delegated to the stem and noteheads wherever possible (ie: deprecate staveNote.ys), then this should be straightforward to support.

Silverwolf90 avatar Sep 04 '16 11:09 Silverwolf90

Hello, is there any news on this lately?

hoangtranwork avatar Jan 17 '20 08:01 hoangtranwork