strk / ireal-musicxml

iReal Pro to MusicXML converter

Home Page:https://blog.karimratib.me/demos/musicxml/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

iReal Pro to MusicXML converter

https://blog.karimratib.me/demos/musicxml/

License:GNU General Public License v3.0


Languages

Language:HTML 91.2%Language:JavaScript 8.7%Language:TypeScript 0.2%