JSPM

musicxml-to-pcm

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q41919F
  • License MIT

Convert MusicXML to PCM audio data.

Package Exports

  • musicxml-to-pcm

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (musicxml-to-pcm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

musicxml-to-pcm NPM version Build status

Convert MusicXML to PCM audio data.

Provides a simple interface for transforming a MusicXML document into a stream of sound samples, which can then be piped to other audio tools / programs (e.g. encoders).

Installation

Install the package with NPM:

$ npm install musicxml-to-pcm

Usage

A single method is exposed, newStream(xml, bitsPerSample, samplesPerSecond), that returns a readable stream emitting notes:

var musicXmlToPcm = require("musicxml-to-pcm");
var fs = require("fs");

var xml = fs.readFileSync("song.xml");
var bitsPerSample = 16;
var samplesPerSecond = 44100;

var stream = musicXmlToPcm.newStream(xml, bitsPerSample, samplesPerSecond);
stream.on("data", function(note) { console.log(note) });
stream.on("end", function() { console.log("Done!") });

A few packages that utilize this interface: