/ireal-musicxml

iReal Pro to MusicXML converter

Primary LanguageHTMLGNU General Public License v3.0GPL-3.0

ireal-musicxml

iReal Pro to MusicXML converter

npm version GitHub Build Status

Demo

Check out the demo! You can upload one of the iReal Pro main playlists as a test.

Usage

import * as iReal2MusicXML from 'ireal-musicxml'
const ireal = // Content of HTML file generated by iReal Pro or irealb:// URI
const playlistSync = iReal2MusicXML.convertSync(ireal)
const playlistAsync = await iReal2MusicXML.convert(ireal)
// => {
//   name:              // Playlist name
//   songs: [{
//     title:           // Title
//     composer:        // Composer
//     style:           // Song style for display
//     groove:          // Song style for playback
//     key:             // Key signature
//     transpose:       // Transposition in semitones
//     bpm:             // Beats per minute
//     repeats:         // Repeat count
//     music:           // Raw song encoding
//     cells: [ Cell ]  // Array of parsed cells
//     musicXml:        // MusicXML output
//   }]
// }

const playlistManual = new iReal2MusicXML.Playlist(ireal)
// => Same as above minus `musicXml` attribute
const musicXml = iReal2MusicXML.MusicXML.convert(playlistManual.songs[0])
// => MusicXML output

Development

xmllint is required to run tests (but NOT at runtime). Tests are used to ensure that the generated MusicXML is valid.

npm install
npm run test

Check out the demos for example usage under demo/.

Documentation