Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

verovio

2.4.0 • Public • Published

This is an NPM of the stable version of the Verovio JavaScript toolkit.

Verovio is a fast, portable and lightweight library for engraving Music Encoding Initiative (MEI) music scores into SVG.

See it running in the MEI Viewer and check out the tutorial for its web integration and for enabling user interaction.

Usage

var verovio = require( 'verovio' );
var fs = require( 'fs' );
 
/* Wait for verovio to load */
verovio.module.onRuntimeInitialized = function ()
{
    /* create the toolkit instance */
    var vrvToolkit = new verovio.toolkit();
    /* read the MEI file */
    mei = fs.readFileSync("hello.mei");
    /* load the MEI data as string into the toolkit */
    vrvToolkit.loadData(mei.toString());
    /* render the fist page as SVG */
    svg = vrvToolkit.renderToSVG(1, {});
    /* save the SVG into a file */
    fs.writeFileSync("hello.svg", svg);
}

Install

npm i verovio

DownloadsWeekly Downloads

98

Version

2.4.0

License

LGPL 3

Unpacked Size

5.24 MB

Total Files

4

Last publish

Collaborators

  • avatar