Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including verovio with all npm packages installed. Try it out:

var verovio = require("verovio")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

verovio v2.7.2

This is the stable version of the verovio package

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);
}

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free