Tuesday, August 03, 2010

VexFlow is Open Source

That's right folks! All the VexFlow code is now available in the VexFlow GitHub Repository.

It's distributed under the OSI approved MIT License, so feel free to tinker, tweak, hack, fix, fork, and redistribute it.

A lot of the core infrastructure (e.g., contexts, formatting, etc.) is ready and stable, and most of the work that needs to be done is adding support for various types of modifiers, effects, and annotations. I've worked on some of the trickier ones, like accidentals and beams, and have left the easier ones out so interested coders can learn by contributing.

This said, algorithms-enthusiasts need not feel left out - there are some hard problems to solve as well :-)

Here's where I would like help from the community:
  • Dots (Easy)
  • Trills (Easy)
  • Grace Notes (Moderate)
  • Slurs (Easy)
  • Glyphs for time signatures (Easy)
  • Key signature (Easy if you reuse the accidental placement code from accidentals.js)
  • Guitar effects: Palm Muting, Scratches, Whammy, Harmonics, etc. (Easy)
  • Chord Stave with Rhythm Slashes (Moderate to Hard)
  • Lyrics (Easy)

Here's what I'm working on right now (and also wouldn't mind some help with):
  • Tuplets / Triplets
  • VexTab parser support for rests, alternate keys, and multiple voices.
  • Alternate tunings and support for arbitrary-string instruments.
There isn't much developer documentation right now, but a good place to start is by going through the code for the tests. You may notice that some files are commented better than others - a great way to help is by adding better comments along with more thorough tests.

If you're not a coder and would like to help, you can do so by testing and reporting bugs, helping with documentation, spending $7 on a TabDiv license, or simply spreading the word.

Thanks for all the support and help over the past few months. Dive in and enjoy!



    Set up a donation link and Ill be the first to donate.

  2. Excellent. I have been following your blog dutifully and this is the best news yet. I can't wait to start contributing to this.

  3. I agree with the first comment about the donation link. I will donate also.

  4. Great! So I guess this is the time to start writing the parsers for musicxml and such? :)

  5. Sweet, I'll have a look at the code over the weekend. :)

  6. I have two questions though:
    - is there a centralized channel that could be used to ask you any questions about the code or the way it works?

    - suppose I would implement a renderer that would render MusicXML to VexFlow, would it be possible to restrict the width of the resulting sheet to a maximum dimension by letting the renderer worry about how much bars could fit on a tabstave or should a fixed value of bars per tabstave be specified?

  7. @Tails

    Re: centralized channel - I'm setting up a mailing-list, stay tuned.

    Re: your parser: Take a look at the VexTab parser for ideas. Basically, the Formatter class is responsible for laying out notes in a stave. It supports two types of formatting: justified and unjustified. With justified formatting, you can set a specific width, and it will try to format the supplied voices such that they fit within that width.

    With unjustified, it produces the best-looking spacing whose width may be arbitrary. To use this, you would format the voice, retrieve the final width, and then decide if you need to break up the voice into multiple tabstaves (e.g., if the width is greater than the page-width). Ideally, this logic would be encapsulated in its own formatter (maybe call it PageFormatter?). This is something I'm considering doing, but has not really been a priority for me.

    Thanks for working on the MusicXML parser. I'm happy to help you with the implementation.

  8. Fantastic work and open source too- brilliant! I definitely want to help. I am interested in making an open source free app for internet etc...First of all I would like to hide the guitar tab. Valuable as it is, I just want the user to control when they want to see it. Is there a command for just showing the standard notation? On your list of things to do- you want to write a time signature glyph and a key signature script. I would like to start on that straight away. Is there a place where you can join in the project? Or where you can leave the work you have finished?

  9. I've got another TODO for you: Auto-Beaming. In the current version you have to group notes using brackets. As you know this beaming should be done automatically along the used durations.

  10. I've begun working MIDIPlugin into Vextab. It's working nicely. I would love to chat with you via email, I'm having a hard time finding a way to contact you though... any recommendations?

  11. I noticed that a lot of this is aimed at creating tabs. Are there plans for making a pure non-tabular music notation renderer? Like what it is right now but with support for a full score, grand staffs, multiple voices, etc? I noticed that on some of your posts but I didn't see them in VexFlow tutorials/code.

  12. I am a little confused. When I opened the glyph file, I was surprised to see a whole set of music making glyphs. There doesn't seem to be the need for any new ones. E.g Glyphs for time signatures are surely the number glyphs one on top of another. Key signature glyphs are accidentals repositioned. So on.. There is code to make stems go up and down but how do you do this with the editor? The glyph script doesn't seem to be created for guitar notation but for music in general...Is there any more documentation that will help. I have gone through the test scripts but they do not reveal how they can be coded for the editor in your tutorial.

  13. "a pure non-tabular music notation renderer... with support for a full score, grand staffs, multiple voices"


  14. Hi I'm interested in helping out too - I'm specifically interested in making drum notation. I'm going to get the source code and start messing around, but getting that mailing list together is super important.

  15. Sorry, it took me too long to set this up. The mailing list (google group) is at:


    Feel free to sign up.