-
Hi! I'm seeking sheet music rendering libraries for my Android/iOS app. I'm choosing between VexFlow and verovio, but since VexFlow is a TypeScript library, I would like to use verovio if possible. I want to change every single measure's width to a specific value. The value may vary by measure. ...
// Create a stave of width 400 at position 10, 40.
const stave = new Stave(10, 40, 400);
... However, I haven't found any options or member functions in Toolkit to do this, which I think is because the Toolkit class is a high-level API. I've read some of the code, and it seems like I can adjust the position of measures by calling I will modify verovio if necessary (I know verovio is licensed under GPL/LGPL), so I would like to know if this is possible with small changes in the current version of verovio. Thanks for reading! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Would it be possible to elaborate a bit more the overall scenario of what you are trying to achieve? There are different ways to adjust the width of a measure. For example, by setting a linear spacing of the content. But that does not seem to be what you want. Depending of what you need it might be more something to set in the data rather than in Verovio. |
Beta Was this translation helpful? Give feedback.
-
Note that Verovio and Vexflow both render musical data to SVG, but in very different ways: vexflow stores/modifies data in Javascript objects to render to SVG, while verovio loads the data into an Emscripten-compiled toolkit to generate an SVG. Verovio's layout is fully automated (via input options), while vexflow typically requires/allows user control of layout directly. You most likely want the option Here is an example using Note that measures 2 and 3 are the same width, despite measure 2 having lots of small durations and measure 3 having a few notes with large durations. Here is what the spacing looks using the defaults for a more traditional spacing: https://verovio.humdrum.org/?file=chorales/chor010.krn&filter=satb2gs Now measures 2 and 3 have very different widths. Now the length of a half note is 1.67 times the width of a quarter note instead of 2 times. And eighth notes are 0.6 (1/1.67) times smaller than a quarter note. In other words there is now a geometric scaling between each rhythmic level, whereas when using You may also need to adjust other parameters such as the |
Beta Was this translation helpful? Give feedback.
Would it be possible to elaborate a bit more the overall scenario of what you are trying to achieve? There are different ways to adjust the width of a measure. For example, by setting a linear spacing of the content. But that does not seem to be what you want. Depending of what you need it might be more something to set in the data rather than in Verovio.