1.1.0 • Published 4 years ago

react-midi-hook v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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