
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Methods for dealing with MIDI data (note numbers, note names, frequencies, etc).
Install using npm:
npm install midiutils
Then require it before using in your code:
var MIDIUtils = require('midiutils');
MIDIUtils.noteNameToNoteNumber('A-4');
You can also download/clone the source. Then just include the source using a script tag before using the library:
<script src="path/to/MIDIUtils.js"></script>
Returns the MIDI note number corresponding to the note name.
MIDIUtils.noteNameToNoteNumber( 'A-0' ); // returns 21
MIDIUtils.noteNameToNoteNumber( 'C-4' ); // returns 60
Returns the frequency represented by noteNumber.
MIDIUtils.noteNumberToFrequency( 69 ); // returns 440 Hz -- i.e. A-4
Returns the MIDI note name corresponding to the note number.
MIDIUtils.noteNumberToName( 21 ); // returns 'A-0'
Returns the note number that corresponds to this frequency.
MIDIUtils.frequencyToNoteNumber( 440.000 ); // returns 69
If you want to get involved with the development of this library or want to contribute, make sure the code you add or change follows the same style as the existing code (whitespace, indenting, etc) and looks consistent with the rest.
Also new features must also be accompanied by both documentation and examples, and new tests demonstrating the usage of the feature, and existing tests must not break.
FAQs
A series of methods to work with MIDI
We found that midiutils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.