react-midi-hook
v1.1.0
Published
React hook to easily use MIDI inputs via the Web MIDI API.
Downloads
7
Readme
react-midi-hook
React hook to easily use MIDI inputs via the Web MIDI API.
Install
yarn add --save react-midi-hook
Usage
import React from 'react'
import useMidi from 'react-midi-hook'
export default function App() {}
const { pressedKeys } = useMidi();
return (
<p>{pressedKeys[0].letter}</p>
);
}
Browser Support
The Web MIDI API is currently only supported on Edge, Chrome and Opera. Please refer to Can I use for up to date information.
License
MIT © matthewshirley