concertmaster
v0.2.2
Published
A simple module to help convert musically relevant information
Maintainers
Readme
concertmaster
This simple module aims to make conversions in music informatics easier. It is helpful for MusicXML processing.
Installation
npm install concertmasterUsage
const cm = require("concertmaster");
console.log(cm.noteToMidi("G#5")); //=> 68Currently supports the following functions:
noteStringToMidiNum(noteString)
takes a note string and converts it to a midi #
Ex:
cm.noteStringToMidiNum("G#5"); //=> 68midiNumToNoteString(midiNum)
takes a midi # and converts to a note string
Ex:
cm.midiNumToNoteString(68); //=> G#5keyToNumSharpsFlats(key)
takes a key and converts it to a number between -6 and 6. Negative numbers represent flats and positive numbers represent sharps as is in accordance with MusicXML
Ex:
cm.keyToNumSharpsFlats("Gb"); //=> -6numSharpsFlatsToKey(numSharpsFlats)
takes a number between -6 and 6 and converts it to a key. Negative numbers represent flats and positive numbers represent sharps as is in accordance with MusicXML
Ex:
cm.numSharpsFlatsToKey(-6); //=> GbMore functionality to come soon...
...
