react-musical-keyboard
Musical keyboard component for React.
react-musical-keyboard
is inspired by the UI/UX of keyboards on FL Studio's piano roll.
Install
npm install --save react-musical-keyboard
Usage
import React from 'react' import MusicalKeyboard from 'react-musical-keyboard' const KEYBOARD_MAPPING = // key code to note ID mapping 81: 60 50: 61 87: 62 51: 63 69: 64 82: 65 53: 66 84: 67 // ... const App = { // ...maybe use the Web Audio/MIDI API to generate sounds? } { // ... } return <MusicalKeyboard = = = = = = = = = = />
License
MIT © Temoto-kun