Simple MIDIAccess Object getter for the WebMIDI API.
- 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
npm install midi-access -g
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')
}
- Switch to Typescript
- Implement refresh method