Introducing MIDIVal: the easiest way to interact with MIDI in your browser

Getting started

Main goals

I designed MIDIVal with few main goals in mind:

  • Platform agnosticism
  • Extendability

High-Level API

The main goal of the project is to provide a high-level API — methods represent music concepts like keypress, control change, etc. API can be easily used without prior knowledge of the MIDI protocol and it’s a perfect choice if you want to quickly prototype a web synthesizer, hack quickly your idea but can be also used in production.

Platform agnosticism

No matter if you want to create a website that interacts with MIDI, a node.js application, or a mobile application written in React Native, you should be able to use MIDIVal in the same way. All implementation details are hidden away in the abstractions and switching between platforms requires minimal setup. The browser implementation is already public and the node and React Native bindings will follow.

Extendability

MIDI devices come in many different shapes and forms — you can use the same messages to control your synthesizer, software effect, set control surface lights, and much more. It is not possible to write a single library to cover all devices and uses. That’s why MIDIVal can be easily extended. You can easily extend the basic functionality and if you need more control over the messages you can still send raw data, including SysEx.

MIDIVal 101 — interacting with your device

Installation

To install MIDIVal you need to install @midival/core package using your favorite package manager:

Sending MIDI messages to your device

Let’s get started with MIDIVal and send a note to the first connected MIDI interface.

Reading MIDI messages

Similarly, you can read MIDI messages sent by your device (for example MIDI controller, control surface, etc).

Call to arms

Senior JavaScript Engineer @ Onfido