Hacker News new | past | comments | ask | show | jobs | submit login
Web MIDI API (webaudio.github.io)
66 points by dgellow on Jan 18, 2015 | hide | past | favorite | 17 comments



Super excited about this! I've been getting into synthesis lately and have been writing a sequencer in Ruby. It's just been tough getting a GUI going on top of it...Shoes is great, but I'd have a much easier/better time building it as a web app. Granted, I suppose I could just build the web UI and send data via websockets.

Anyways, awesome stuff! MIDI is fun to work with; it's dead simple and with the right synths you can get some crazy things going working with it programmatically!


I suggest you build the sequencer in Max[1] or Pure Data[2]. Their advantages are:

1. You don't need to write any codes for UI objects

2. Simple things are faster to accomplish in these software.

3. For common complex tasks (fft etc.), Max or pd have built-in solutions that are likely better than the ones you build on your own.

4. You can script Max using js/lua/java. Hence if you want to build something complex and unusual, you can still fall back to programming.

5. You don't need to worry about timing in general. For example you can generate complex rhythm patterns in advance using lua/js/java and trigger them using Max/pd in real time. It will definitely perform better than some random web technology.

[1]: https://cycling74.com/ [2]: http://puredata.info/


Latency would worry me with this. The browser VMs aren't real time systems.


I guess my biggest question is why? There are better protocols out there, like RTP-MIDI, that exist to send MIDI events over networks, and aren't dependent on a single language's rather extensive baggage. Web MIDI just seems like it'll end up being a latency-ridden glitchfest as people try to debug webservers and web software for solutions that are better created elsewhere.


If you find yourself with the need for arbitrarily timed events with arbitrary payload and arbitrary behavior in just JavaScript, I have a library called Barrel that might be of help: https://www.npmjs.com/package/barrel


I wonder why they didn't build on OSC.


The vast majority of controllers use MIDI. OSC is a neat idea and useful for networking actual computers together when MIDI is not enough, but the truth is that MIDI is the industry standard, so if you want to build an API that can take advantage of all the MIDI control surfaces out there, you can't build it upon OSC.


Reminds me of an interesting project my friends worked on in 2003 that did something similar: http://web.archive.org/web/20031203135012/http://www.midiweb...

Nice to see a spec for this!


I can't seem to find a list of browsers that have implemented the API and to what extent. Anyone?


Just Chrome at the moment behind a flag. Currently being implemented in Firefox.

- chrome://flags/#enable-web-midi

- https://bugzilla.mozilla.org/show_bug.cgi?id=836897


Hi. Person assigned WebMIDI for Firefox here. Hoping to get it happening in the next couple of months. We really need this is more browsers to push the spec to standard, it's been in Chrome Canary/flagged forever just waiting for more support.


Greetings! Is there anything a member of the public like me can do to help WebMIDI for Firefox along? e.g. testing or whatever? Thank you.


And last time I tried it, only MIDI in.

(I'm really hoping for Sysex out. there is a polyfill in the meantime).

Waiting patiently here :) :) :)


did anyone ever found any realistic use of vanilla midi in the wild?

always had to deal with proprietary nonsense and bad drivers for most input devices.


My experience has been the opposite. Everything from the obvious keyboards and drum pads to controller boxes with LEDs, faders, dials, etc, tend to use usb midi, with drivers that Just Work.


are there ready-to-use soft synthesizers for specific instruments, e.g. piano?


On many OSes, yes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: