Vexflow: [EasyScore] More than one bar in a stave not working

Created on 5 Dec 2016  路  4Comments  路  Source: 0xfe/vexflow

I'm trying to create a score from a string, for example: notesString = "F#6/4, G#5/4, E6/4, G#5/4 | D6/4, G#5/4, C#6/4, G#5/4" and the second bar is not being rendered. I can't see any error in the string there. Is this because I understood something wrong in the documentation or is really a bug?
I'm using a code like this:

var score = vf.EasyScore()
var system = vf.System()
system.addStave({
      voices: [
        score.voice(score.notes(notesString))
      ]
    }).addClef('treble').addTimeSignature('4/4')

And the result is:
image

question

Most helpful comment

Yeah, | is not EasyScore syntax -- it's VexTab, which is where you probably remember it from.

Take a look at tests/bach_tests.js for an example of how to render multiple staves.

All 4 comments

Creating multiple bars is not supported by EasyScore. | is not valid syntax.

Are you not getting some kind of error?

I'm trying to find where I read something that might have hinted to me that | would be a bar divider, but I couldn't find it.

Vexflow gave me no error, it seems that it just ignores everything after the non-valid character. If I remove the | character, it gives the same result. It only gives me an error if I don't provide enough notes in the string:
[RuntimeError] IncompleteVoice:Voice does not have enough notes.
So, to get an music sheet with two bars per line I should render another stave side by side? What do you think would be my best option?

I think I can live with one bar per line in the earlier stages of development of my project. But some day I might have to change that.

Yeah, | is not EasyScore syntax -- it's VexTab, which is where you probably remember it from.

Take a look at tests/bach_tests.js for an example of how to render multiple staves.

That's right. Thank you :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jkopyto picture jkopyto  路  5Comments

HollyJHuber picture HollyJHuber  路  5Comments

erquiaga picture erquiaga  路  7Comments

dinukadesilva picture dinukadesilva  路  5Comments

devboell picture devboell  路  6Comments