@folkdb/abc-render-svg

1.0.1 • Public • Published

@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

Package Sidebar

Install

npm i @folkdb/abc-render-svg

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

370 kB

Total Files

5

Last publish

Collaborators

  • danielnarey