mtp
musicxml-to-pcm
npm i musicxml-to-pcm
mtp

musicxml-to-pcm

Convert MusicXML to PCM audio data.

by Luke Horvat

0.0.2 (see all)License:MITTypeScript:Not Found
npm i musicxml-to-pcm
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:

Downloads/wk

2

GitHub Stars

15

LAST COMMIT

7yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.0.2
latest
8yrs ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate