A VexTab Parser for VexFlow. Copyright (c) 2012 Mohit Muthanna Cheppudira.
VexTab is a language that allows you to easily create, edit, and share music notation and guitar tablature. Unlike ASCII tab, which is designed for readability, VexTab is designed for writeability.
Go try it out at The VexTab Tutorial.
If you want to save and share your VexTab, try out My Vexflow.
VexTab 2.0 now supports all VexTab 1.0 features, and includes a few new ones.
The original version of VexTab is chock full of suck. It's basically a hand-rolled recursive descent parser that generates VexFlow elements inline. It's also a convoluted piece of JavaScript that is very difficult to read and modify.
Oh, and I really hate JavaScript.
VexFlow was built to run with no dependencies at all (not even jQuery.) Although it works well, I've had to re-implement half-assed versions of useful routines to make JavaScript easier to work with (each, merge, min, max, sortby, etc.)
With this version of VexTab I'm going to relax my "no dependency" restriction and experiment with some technologies that make in-browser programming simpler to work with.
This rewrite of VexTab has three key dependencies:
- CoffeeScript - A nicer JavaScript.
- Jison - An LALR(1) parser modeled on Bison.
- Underscore.js - A utility-belt library for JavaScript.
First install Node:
$ brew install node (on OSX)
$ sudo apt-get install node (on Linux)
Then install CoffeScript and Jison. Do this from the root VexTab directory so it creates a sub-directory called node-modules
.
$ npm install jison coffee-script
Next, install Ruby and the bundler
gem. Then install all the dependencies
by typing:
$ bundle install
Quesions? Ask the VexFlow Google Group.
Run rake
and pull up build/src/runtest.html
in your browser.
If you want to auto-build on changes to source files type:
$ rake watch
VexTab is an open specification and the reference implementation (this repository) is open source. It is freely available complete and uncrippled for non-commercial use.
If you would like to use this code on commercial websites, products, blogs, plugins, or tools, please get in touch with me. (I'm very reasonable.)
Copyright (c) 2012 Mohit Muthanna Cheppudira
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice shall be included in all copies or substantial portions of the Software.
Note: The underlying library, VexFlow, is completely open source and distributed under the MIT license. See the VexFlow GitHub Page for details.