Adding new bar lines to vextab #36

gregjopa opened this Issue Nov 9, 2011 · 1 comment


None yet

2 participants

gregjopa commented Nov 9, 2011

I am working on updating the Vexflow tutorial to describe how to use the new bar lines in stavebarline.js. We currently have two techniques for adding bar lines - using multiple staves per line or using one stave per line and using barnote.js to draw the bar lines. VexTab uses the second technique to draw bar lines with barnote.js. I have attempted to update barnote.js to utilize stavebarline.js here: (scroll to the bottom and check out technique 2 in step 6). However, this new barnote.js code a bit hacky since stavebarline.js inherits from stavemodifier.js while barnote.js inherits from note.js. This brings up the design question - should bar lines be derived from notes or from stave modifiers?

I see two options to resolve this issue:

  1. Eliminate barnote.js and update VexTab to use multiple staves per line
  2. Rewrite stavebarline.js to derive from note.js and support both techniques for adding barlines
0xfe commented Jan 9, 2013

I fixed this by making BarNote use StaveBarline to do the underlying rendering. BarNote now takes a "type" which specifies the type of bar.

VexTab uses a stave modifier or a barnote depending on the position of the bar.

@0xfe 0xfe closed this Jan 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment