🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

midi-json-parser

Package Overview
Dependencies
Maintainers
1
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

midi-json-parser

This module is parsing midi files into a human-readable JSON object.

latest
Source
npmnpm
Version
8.1.68
Version published
Weekly downloads
258
0.39%
Maintainers
1
Weekly downloads
 
Created
Source

midi-json-parser

This module is parsing midi files into a human-readable JSON object.

version

This module parses a binary MIDI file and turns it into a JSON representation. This JSON representation can then for example be used to pass it on to the midi-player. It can also be encoded again as a binary MIDI file using the json-midi-encoder.

Usage

This module is available on npm and can be installed by running the following command:

npm install midi-json-parser

Once the module is installed you can use its one and only function as shown in the example below:

import { parseArrayBuffer } from 'midi-json-parser';

// Let's assume there is an ArrayBuffer called arrayBuffer which contains the binary content of a
// MIDI file.

parseArrayBuffer(arrayBuffer).then((json) => {
    // json is the JSON representation of the MIDI file.
});

In case you are comfortable with TypeScript, this is the interface which describes the JSON representation:

interface IMidiFile {
    division: number;

    format: number;

    tracks: TMidiEvent[][];
}

The type TMidiEvent is a union of all possible MIDI events. Here is the complete list of all MIDI events this module can handle:

Acknowledgement

Developing this module wouldn't have been possible without all the great resources out there. The following list tries to mention a few of them:

Keywords

MIDI

FAQs

Package last updated on 21 Sep 2025

Did you know?

Socket

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.

Install

Related posts