Vexflow: easyScore vs Vexflow

Created on 10 Apr 2019  路  7Comments  路  Source: 0xfe/vexflow

When would it be more beneficial to use easyScore vs the full VexFlow API?

Most helpful comment

Hi folks --

Simon is right about simplicity vs. functionality, however:

  • You can use both VexFlow and EasyScore together, since EasyScore exposes all VexFlow elements through its APIs.
  • EasyScore lets you attach ids and classes to the elements, and maintains a registry. This reduces the amount of code you need to write, and makes it easy to manipulate elements.
  • EasyScore is much simpler to extend to support new elements.

So I would recommend using EasyScore for a lot of the basic stuff, and extending with VexFlow if you want to customize.

Here's a good example of rendering a score with EasyScore, and using VexFlow directly for extensions (e.g., fingerings, articulations, dynamics, slurs etc.)

Code: https://github.com/0xfe/vexflow/blob/master/tests/bach_tests.js

Mo.

All 7 comments

easyScore is easier to use, it's good for quickly rendering basic scores.
easyScore does not have the full functionality of Vexflow though.
So if you intend to do more complex things and use the full functionality of Vexflow, better start on it directly. It's also more active and more likely to be updated than easyScore.

647 FYI: Also has some info in it.

I still wonder if there is an easy way to do stuff in vexflow (e.g. render some music): and somehow store how you did it (e.g. in json?)

Hi folks --

Simon is right about simplicity vs. functionality, however:

  • You can use both VexFlow and EasyScore together, since EasyScore exposes all VexFlow elements through its APIs.
  • EasyScore lets you attach ids and classes to the elements, and maintains a registry. This reduces the amount of code you need to write, and makes it easy to manipulate elements.
  • EasyScore is much simpler to extend to support new elements.

So I would recommend using EasyScore for a lot of the basic stuff, and extending with VexFlow if you want to customize.

Here's a good example of rendering a score with EasyScore, and using VexFlow directly for extensions (e.g., fingerings, articulations, dynamics, slurs etc.)

Code: https://github.com/0xfe/vexflow/blob/master/tests/bach_tests.js

Mo.

I still wonder if there is an easy way to do stuff in vexflow (e.g. render some music): and somehow store how you did it (e.g. in json?)

That would be great, but it certainly isn't there yet.
I mean, it's already there in the way that the vexflow code you write shows how you did it.
The ideal feature would be to parse vexflow code into easyscore code or MusicXML or something, but that would be a lot of work.

I still wonder if there is an easy way to do stuff in vexflow (e.g. render some music): and somehow store how you did it (e.g. in json?)

That would be great, but it certainly isn't there yet.
I mean, it's already there in the way that the vexflow code you write shows how you did it.
The ideal feature would be to parse vexflow code into easyscore code or MusicXML or something, but that would be a lot of work.

This will be something I am interested in doing after Thanksgiving. I have started building a library of individual notes and rhythms so a novice user can create a score in real time (think young piano student).

If it's helpful, music21j parses simple musicxml and outputs Vexflow to SVG. Not the most well-documented system, but it mostly works.

OpenSheetMusicDisplay does the same:
https://github.com/opensheetmusicdisplay/opensheetmusicdisplay
it may offer some inspiration for vexflow conversion topics.

(sorry to plug our project again as well, but while we're on that topic... ^^)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aemion picture aemion  路  3Comments

gciluffo picture gciluffo  路  4Comments

CrystalShardz picture CrystalShardz  路  4Comments

compilelife picture compilelife  路  4Comments

jeroenlammerts picture jeroenlammerts  路  4Comments