Render ABC music notation to SVG in a Node environment
npm i @folkdb/abc-render-svg
This package is released as an ES module only. Minimum Node.js version is 12 (latest LTS as of release date). CommonJS require()
is not supported.
import abcRenderSvg from '@folkdb/abc-render-svg'
(async () => {
const svg = await abcRenderSvg(`
X:1
T:Notes
M:C
L:1/4
K:C
c d e f|g a b c'|]
`);
// do something with SVG
})();
The module's default export is a function with the following parameters:
function(content: string, options = {}): string
- content: the ABC string to be rendered to SVG
- options: additional options passed to the abcjs library's
renderAbc
function