Giter Site home page Giter Site logo

Comments (3)

matthewshirley avatar matthewshirley commented on June 1, 2024

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.

ilionic avatar ilionic commented on June 1, 2024

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.

matthewshirley avatar matthewshirley commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.