export notation generated by alpatex into image file #481
-
Descriptionsome of music notation software has a feature to export notation into image file e.g. musescore, etc Possible Solutionse.g. this just a prototype, change svg_id with any html element produced by alphatab, but this code not work because alpatab generate more than 1 svg or canvas tags
Questionis there any way to export notation generated by alpatex into image file (svg, png, etc) ? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
AlphaTab provides the necessary APIs to build such an export functionality but it does not provide it out of the box. If you just want to render the score off-screen you will need to use the Low Level APIs as described here: https://www.alphatab.net/docs/guides/lowlevel-apis/#rendering-files-via-scorerenderer To render SVG contatenate all chunks into one big SVG. For Raster Images use the HTML5 engine and then use the resulting Canvas Element to export it to an image. If you are using the C# version you can fetch the SKImage instances and render them to a full canvas. For C# there is a small sample project here: https://github.com/CoderLine/alphaTab/tree/develop/src.csharp/Samples/AlphaTab.Samples.PngDump You can also increase https://www.alphatab.net/docs/reference/settings/display/barcountperpartial/ to get only one partial with all bars inside. But for HTML5 rendering you might run into issues when the canvas becomes too large. Browsers have limitations there. |
Beta Was this translation helpful? Give feedback.
AlphaTab provides the necessary APIs to build such an export functionality but it does not provide it out of the box.
If you just want to render the score off-screen you will need to use the Low Level APIs as described here: https://www.alphatab.net/docs/guides/lowlevel-apis/#rendering-files-via-scorerenderer
To render SVG contatenate all chunks into one big SVG. For Raster Images use the HTML5 engine and then use the resulting Canvas Element to export it to an image. If you are using the C# version you can fetch the SKImage instances and render them to a full canvas.
For C# there is a small sample project here: https://github.com/CoderLine/alphaTab/tree/develop/src.csharp/Samples/AlphaTa…