A series of methods to work with MIDI

npm install midiutils
1 downloads in the last week
10 downloads in the last month


Methods for dealing with MIDI data (note numbers, note names, frequencies, etc).

Currently available methods

noteNameToNoteNumber( name )

Returns the MIDI note number corresponding to the note name.

MIDIUtils.noteNameToNoteNumber( 'A-3' );    // returns 37
MIDIUtils.noteNameToNoteNumber( 'C-4' );    // returns 40

noteNumberToFrequency( number )

Returns the frequency represented by noteNumber.

MIDIUtils.noteNumberToFrequency( 49 ); // returns 440 Hz -- i.e. A-4

noteNumberToName( number )

Returns the MIDI note name corresponding to the note number.

MIDIUtils.noteNumberToName( 49 ); // returns 'A-4'
npm loves you