LarryKu
unread,Mar 25, 2013, 11:08:11 AM3/25/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vex...@googlegroups.com
The volta types in the previous post were incorrect. Here are the correct types:
BEGIN - draw short vertical line at start of measure
MID - draw horizontal extension line
END - draw short vertical line at end of measure
BEGIN_END - draw short vertical line at start and end of measure.
As you create each stave (measure), set the volta type you want drawn above the measure using the setVoltaType(type, text, vert_offset) function. The parameters of the function are:
type - volta type described above
text - The ending number ("1.", "2.", etc)
vert_offset - moves the volta vertically, negative numbers to raise the voltas, positive numbers to lower the voltas.
To duplicate the example, assuming measures 3 through 6:
stave3.setVoltaType(Vex.Flow.Volta.type.BEGIN, "1.", 0);
stave4.setVoltaType(Vex.Flow.Volta.type.MID, "", 0);
stave5.setVoltaType(Vex.Flow.Volta.type.END, "", 0);
stave5.setEndBarType(Vex.Flow.Barline.type.REPEAT_END); // draw the end repeat bar line
stave6.setVoltaType(Vex.Flow.Volta.type.BEGIN_END, "2.", 0);
stave6.setEndBarType(Vex.Flow.Barline.type.DOUBLE); // draw the double ending bar line
Hope this helps.