Skip to content

Auto-beaming in EasyScore #1506

Answered by dino-prpic
dino-prpic asked this question in Q&A
Dec 28, 2022 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

I found the problem. It appears that TickContext is being created after calling the draw() method from Factory instance.

So for future reference:
Define let beams = []; after defining let factory = new Vex.Flow.Factory(...); and then use

beams = beams.concat(Beam.generateBeams(system.partVoices[v].getTickables(), {
    groups: [new Vex.Flow.Fraction(2, 8)]
}));

for each voice in each system.

At the end of the score first call factory.draw();, and then beams.forEach((beam) => beam.setContext(factory.getContext()).draw());!

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dino-prpic
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dino-prpic
Comment options

You must be logged in to vote
1 reply
@dino-prpic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants