react-midi-hook

1.1.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (21)

    Package Sidebar

    Install

    npm i react-midi-hook

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    48.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • mattshirley