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