Auto-beaming in EasyScore #1506
-
Is there a way to auto-beam voices using EasyScore? I built this code below and it works perfectly until i try to add beams (look for The code:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
For auto-beam in easy score, use See https://github.com/0xfe/vexflow/blob/master/tests/bach_tests.ts or https://github.com/0xfe/vexflow/blob/master/tests/easyscore_tests.ts for examples. |
Beta Was this translation helpful? Give feedback.
-
I found the problem. It appears that So for future reference:
for each voice in each system. At the end of the score first call |
Beta Was this translation helpful? Give feedback.
-
Glad you figured it out.
You will always get this error if you try to beam something >= 1/4 note. That doesn't have anything to do with
If you are rendering manually, you need to draw in order: 1) stave, 2) voices 3) beams. Until the voices are drawn, the notehead locations aren't known (that is what the |
Beta Was this translation helpful? Give feedback.
I found the problem. It appears that
TickContext
is being created after calling thedraw()
method from Factory instance.So for future reference:
Define
let beams = [];
after defininglet factory = new Vex.Flow.Factory(...);
and then usefor each voice in each system.
At the end of the score first call
factory.draw();
, and thenbeams.forEach((beam) => beam.setContext(factory.getContext()).draw());
!