Interacting with a midi keyboard or other realtime midi input with javascript?

I want to create a simple visualization tool that allows me to present my game on the midi keyboard on the screen. I play a relatively new type of instrument called a harmonic table:

http://en.wikipedia.org/wiki/Harmonic_table_note_layout

http://www.soundonsound.com/newspix/image/axis49.jpg

And you want to create tools to facilitate their use and teach others how to use them.

However, I canโ€™t find a good way to get midi in a javascript environment (or, for that matter, Flash or Java without much help from jiggery-pokery, slightly exceeding my reach, and using code from which look rather outdated and abandoned projects open source. Not a single language that I am too enthusiastic to work on this project anyway).

Is there a suitable library or application that I skipped that will allow me to do this?

+6
source share
7 answers

While looking for another solution (based on Flash, using the open source Red5 Flash server features is really ugly, but I'm desperate at the moment). I found someone who did what I needed using Java to interface with the hardware. They started with a flash solution and recently ported to Javascript. Hurrah!

http://www.abumarkub.net/abublog/?p=505

Don't let the โ€œproof of conceptโ€ clauses hinder you: the basic functions seem solid, at least with everything I could throw at it.

So, now I'm on my way, and so there is someone else who wants to create javascript-based interfaces midi / synths / what have you.

I can manipulate midi in real time in javascript! This is much better than flying cars and jets.

+10
source

I created an NPAPI browser plugin that allows you to communicate in Javascript with MIDI devices.

It currently works on OSX in Chrome and Safari, as well as on Windows in Chrome.

I am working on supporting other browsers (Firefox, Internet Explorer) and other operating systems (Linux, Android, iOs)

See: http://abumarkub.net/abublog/?p=754

+9
source

EDIT:

I recently published this module https://github.com/hems/midi2funk its node.js module, which listens for midi and translates it through socket.io if you have the opportunity to run the node.js service locally with its client side, you can enjoy it ...

~~~~~

A few other convenient links, I seem to have ordered what you think would be the most important for you:

edit: just realized the thread is old, hope the links help someone (::

+8
source

The web interface API is now available in Google Chrome 43+. I even wrote a library to make it easier to work with. If you're still interested and don't care that it only works in Chrome, check it out: https://github.com/cotejp/webmidi

+3
source

Most browsers do not allow access to any equipment other than the keyboard and mouse for obvious security reasons, so it is unlikely that you could access a midi device if it is not connected to one of these devices.

You can try to find a driver that will translate midi output to keystrokes, and then work with browsers, but this will only be a single-computer solution.

+1
source

I really love the upcoming Web MIDI API . As far as I know, it is only being discussed and has not yet reached any browsers.

In combination with the web audio API, which has already begun to be implemented in some browsers, a complete synthesis of the software will be possible in the browser. Fascinating times.

+1
source

Since the Web MIDI API is still a draft, there is no way to directly access MIDI events in the browser.

A simple workaround is to record a small server where you record MIDI events and send them to your javascript using websocket. This can be done quite easily in Python.

+1
source

Source: https://habr.com/ru/post/891602/


All Articles