Skip to content

A simple module to help convert musically relevant information

License

Notifications You must be signed in to change notification settings

MegaArman/concertmaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

concertmaster

This simple module aims to make conversions in music informatics easier. It is helpful for MusicXML processing.

Installation

npm install concertmaster

Usage

const cm = require("concertmaster");
console.log(cm.noteToMidi("G#5")); //=> 68

Currently supports the following functions:

noteStringToMidiNum(noteString)

takes a note string and converts it to a midi #

Ex:

cm.noteStringToMidiNum("G#5"); //=> 68

midiNumToNoteString(midiNum)

takes a midi # and converts to a note string

Ex:

cm.midiNumToNoteString(68); //=> G#5

keyToNumSharpsFlats(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"); //=> -6

numSharpsFlatsToKey(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); //=> Gb

More functionality to come soon...

...

About

A simple module to help convert musically relevant information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages