
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
midi-message-parser
Advanced tools
Parse MIDI data into JSON and back again.
This library is for you if:
import { MidiMessage } from 'midi-message-parser';
const rawMidiData = [144, 60, 64]; // <-- imagine this came from a midi device.
const timestamp = 740; // <-- timestamp that came along with midi data.
// Take raw midi info (from node-midi, browser midi events, etc.)
// and parse it into something easier to understand.
const message = new MidiMessage(rawMidiData, timestamp);
// Message is a simple object describing the midi message.
console.log(message.type); // 'noteon'
console.log(message.channel); // 0
console.log(message.number); // 60 (the key pressed)
console.log(message.value); // 64 (the velocity)
console.log(message.timestamp); // 740
console.log(message.ccMode); // false (something like 'monoon' for channel mode messages)
// You can also construct one from a browser MidiMessageEvent
const message2 = new MidiMessage(midiMessageEvent);
// Or create one manually.
const message3 = new MidiMessage(
'noteon',
64, // note number
60, // velocity
2, // channel
0, // timestamp
);
// You can convert a midi message back into raw midi data to send.
const outputMidiData = message.toMidiArray();
console.log(outputMidiData); // [144, 60, 64]
If this library doesn't fit the bill, try one of these...
FAQs
Parse MIDI data into JSON and back again.
The npm package midi-message-parser receives a total of 2 weekly downloads. As such, midi-message-parser popularity was classified as not popular.
We found that midi-message-parser 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.