0xfe / vextab

A VexTab Parser for VexFlow
Other
588 stars 115 forks source link

Would you consider alternate grammars for vextab, or extensions to existing ones? #121

Open jzohrab opened 3 years ago

jzohrab commented 3 years ago

Hello @0xfe -- this library, and vexflow, are just incredible. I've been working with vextab for a short while and wondered if you'd consider variations/extensions on the existing grammar, if it increases the clarity/utility of vextab.

For example, the notation below

image

is vextabbed as

tabstave notation=true
notes :8 6/4 $.fingering/1:l:f:2.$ h7/4 $.fingering/1:l:f:3.$ :q 0/2 $.fingering/1:r:f:3.$ $.a>/top.$

I've only briefly looked at the jison, but believe that it should be possible to extend the grammar to handle some common (?) things in a simplified manner that would render the same results as above, maybe something like:

tabstave notation=true fingering=left accents=top
notes :8 6/4[f2] h7/4[f3] :q 0/2[f3:r, >]

It's totally a nice-to-have for me at this point, but if you think it would be a good addition, I could take a look into it. I'd prefer to contribute back here rather than fork.

Cheers and thank you again, jz

0xfe commented 3 years ago

Hi -- yes, sounds like a good idea. Happy to look at a PR. :-)

jzohrab commented 3 years ago

Thanks @0xfe. I've pushed a new branch to my fork with an initial failing test and will try scheduling time to work on the simplified grammar (leaving the existing grammar in place).

https://github.com/0xfe/vextab/compare/master...jzohrab:spike-simplified-grammar

Cheers! jz