MatthewDorner/abcjs-vexflow-renderer

Tab Stems and longer beams

beckersi opened this issue · 5 comments

Hi Matthew,
is it possible to display Tab Note Stems wih your renderer?
canvas

Also I would like to know if there is an easy way to render beams of four notes like in the example here:
canvas1

Thanks,
Simon

Tab stems are not currently supported, but would probably be easy to implement since VexFlow supports them. Is this for a use case where you want to only show tabs and not sheet music? Because currently, the option is only to show/hide tabs, though an option to show/hide regular stave could be added. I avoided cluttering the tabs with elements that are already displayed in the regular stave above it.

As for beams, it relies on VexFlow's Beam.generateBeams for non-compound time signatures. I wrote my own code to handle beaming for compound time signatures, but your example looks like non-compound time. If VexFlow's beaming code has an option for this, this library could be made to support it. Otherwise I guess we could stop using Beam.generateBeams and adapt generateBeamsCompound for non-compound time signatures, to handle all beaming inside this library.

Thank you for your reply. The Tab stems are for a use case where both tabs and sheet music are shown. However, it would be nice to have the option to turn tab stems on and off if it doesn't lead to too much cluttering.

I'll take a shot at implementing these, it probably isn't difficult to modify my beaming code to work for all time signatures, and I'd rather have beams of four notes too, if possible.

OK, I changed the beaming in 4/4 time to beam groups of 4 eighth notes, but left it to VexFlow defaults for other time signatures. Were you seeing issues in any other time signatures? Then also added the tabStemsVisibility in renderOptions. You'll have to also adjust lineHeight to make space for the stems.