Comments (3)
Hey @ilionic,
Good question. MIDI has 127 bytes (notes) and a piano only has 88 notes. The lowest key on the piano is MIDI note 21. In my testing, I wanted to know the "real" key that was pressed on the device.
In regards to seeing multiple events, that's strange. What MIDI device are you using?
Was looking for some alternatives to https://github.com/djipco/webmidi with hooks support.
I initially created this repository to test the MIDIAccess API. However, I am thinking of maturing this package by utilizing the webmidi project which has covered more uses. Are you looking for hooks support or was there something lacking from that repository?
from react-midi-hook.
I wanted to know the "real" key that was pressed on the device.
Interesting requirement but not something I would expect from midi input library, as there are standard things ( ie 69 is A4 and 440hz ). Many libraries based on such standards if I need to feed an oscillator or play piano sample. Anyway, something I tried and adjusted by addition of 21 but felt weird.
MIDI device - NI Komplete 49. I compared with bunch of other libraries and other worked fine. So settled for now with https://github.com/nickroberts404/react-midi-hooks
The reason switching from webmidi
- just to have support for hooks since local state behaves strangely inside of event listeners.
Perhaps I could'v just write additional wrappers and custom hooks around webmidi but didn't have time / energy doing it.
from react-midi-hook.
Thanks for the feedback and apologies for the duplicate event issue. I didn't realize that would be an unusual requirement but can remove the calculation of the position to avoid confusion. I would definitely recommend a more mature library since this has library has only had a few hours of work.
from react-midi-hook.
Related Issues (2)
- Trigger Method HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-midi-hook.