Adding dynamics to the score #1640
-
Beta Was this translation helpful? Give feedback.
Answered by
AaronDavidNewman
Nov 2, 2024
Replies: 1 comment 1 reply
-
You have to render the note first to get the absolute X. This is what I do in Smoosic: Here is an a abridged version. This is vex4. Vex5 might have slightly different syntax. var x = stemmableNote.getAbsoluteX();
var y = stave!.getYForLine(11); // assuming you want it on the bottom, stave is the vexflow Stave object
var code= 'dynamicForte'; // e.g. dynamicMezzo
var fontSize = 30;
const glyph = new VF.Glyph(text, fontSize);
glyph.render(context, x, y); // context is SVG context |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
XenonApps
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to render the note first to get the absolute X. This is what I do in Smoosic:
Here is an a abridged version. This is vex4. Vex5 might have slightly different syntax.