Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

midievents

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

midievents

Decode/encode MIDI events.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

midievents

Decode/encode MIDI events.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate Dependency Status

What it does

  • Decode MIDI events
  • Check MIDI events (using strictMode)
  • Calculate needed buffer to encode MIDI events
  • Encode MIDI events

What it doesn't do

Usage

// Your variable with an ArrayBuffer instance containing your MIDI events
var anyBuffer;

// Parse MIDI events
var events = [];
var parser = new MIDIEvents.createParser(new DataView(anyBuffer), 0, false);
var event = parser.next();

do {
  events.push(event);
  event = parser.next();
} while(event);

// Check bufffer size before encoding
if(anyBuffer.length >= MIDIEvents.getRequiredBufferLength(events)) {
  console.log('ok');
}

// Encode MIDI events
var destination = new Uint8Array(anyBuffer);
MIDIEvents.writeToTrack(events, destination);

## Contributing / Testing Install them and run the following command :

npm install --dev
su npm install grunt-cli -g
grunt test

## Contributing

  • Feel free to PR
  • If you find MIDI events the library can't read, create a test an do a pull request. I'll work on it asap.
  • Run npm run to get a list of useful development commands.

License

MIT

Keywords

FAQs

Package last updated on 29 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc