midi-access

1.0.2 • Public • Published

midi-access

Simple MIDIAccess Object getter for the WebMIDI API.

Description

  • This is currently under development
  • The default imported object is a simple way of getting MIDI access or gracefully dealing with failed permissions
  • Access object will be either a MIDIAccess object or null

Installation

npm install midi-access -g

Usage

import midiAccess from 'midi-access'

if (midiAccess) {
    const outputs = Array.from(midiAccess.outputs.values())
    console.log('MIDI outputs:', outputs)
} else {
    console.error('No MIDI access')
}

To-do

  • Switch to Typescript
  • Implement refresh method

Readme

Keywords

Package Sidebar

Install

npm i midi-access

Weekly Downloads

7

Version

1.0.2

License

ISC

Unpacked Size

1.42 kB

Total Files

3

Last publish

Collaborators

  • jankrum