@folkdb/abc-render-svg
v1.0.1
Published
Render ABC music notation to SVG in a Node environment
Downloads
9
Maintainers
Readme
@folkdb/abc-render-svg
Render ABC music notation to SVG in a Node environment
Install
npm i @folkdb/abc-render-svg
Usage
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
})();
API
The module's default export is a function with the following parameters:
function(content: string, options = {}): string
Required
- content: the ABC string to be rendered to SVG
Rendering Options
- options: additional options passed to the abcjs library's
renderAbc
function