Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewshirley/react-midi-hook
React hook to easily use MIDI inputs via the Web MIDI API 🎹 🎼
https://github.com/matthewshirley/react-midi-hook
midi midiaccess react react-hooks web-midi-api
Last synced: about 2 hours ago
JSON representation
React hook to easily use MIDI inputs via the Web MIDI API 🎹 🎼
- Host: GitHub
- URL: https://github.com/matthewshirley/react-midi-hook
- Owner: matthewshirley
- Created: 2020-04-29T05:30:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T04:34:20.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T04:07:00.272Z (about 1 month ago)
- Topics: midi, midiaccess, react, react-hooks, web-midi-api
- Language: JavaScript
- Homepage:
- Size: 1.81 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-midi-hook
> React hook to easily use MIDI inputs via the Web MIDI API.## Install
```bash
yarn add --save react-midi-hook
```## Usage
```jsx
import React from 'react'
import useMidi from 'react-midi-hook'export default function App() {}
const { pressedKeys } = useMidi();return (
{pressedKeys[0].letter}
);
}
```# Browser Support
The Web MIDI API is currently only supported on Edge, Chrome and Opera. Please refer to [Can I use](https://caniuse.com/#feat=midi) for up to date information.
## License
MIT © [matthewshirley](https://github.com/matthewshirley)