The Music Platform for The Web:

Web Audio and Web MIDI


Chris Wilson / @cwilso

Google Chrome Developer Advocate
cwilso@google.com

The Web Audio API

A powerful audio core for gaming and music in JavaScript


  1. Precise timing of lots of sounds
  2. Audio pipeline/routing for effects & filters
  3. Can analyze and visualize audio data live

DEMO

Vocoder
(Analysis, Filtering, Visualization)
Synthesizer
(Synthesis, Filtering, Scheduling)

Covers many audio scenarios:


  • Gaming
  • App UX feedback
  • Music applications - soft synths, DAWs
  • Audio processing

Effects in Web Audio


  • Filtering
  • Delay
  • Compression
  • Convolution
  • Waveshaping
  • 3D Positioning/Panning/Doppler
  • Audio input
  • Waveform synthesis: oscillators
  • Parameter scheduling (envelopes)
  • Offline processing

Web Audio Implementation Status:


Supported in:

  • Chrome and Opera (Blink)
  • Safari (Webkit)
  • Mozilla (independent implementation)

NOT supported in:

  • Internet Explorer

I/O Latency varies according to system


OSX is best, then Windows, ChromeOS, iOS, Android, Linux.

We're working on it.

Audio Input

Now we can get input too!

Hooking up to the Real World:
the Web MIDI API


Think of this as "CoreMIDI for the web platform." It's a developing standard JavaScript API for sending and receiving MIDI messages to/from devices.

 

(I also publish a plugin-based polyfill.)

Spec is now mostly stable, though getting minor tweaks.

Web MIDI Implementation Status:


Supported in:

  • Chrome (under a user flag) on OSX and Windows
  • Chrome (under a user flag) on Android, ChromeOS and Linux (in progress)

NOT supported in:

  • Safari
  • Mozilla
  • Internet Explorer

Status of Web MIDI API


Apple was very negative to the initial suggestion a year ago.
  • "Only a few people have the hardware to use it"
  • "I don't see evidence that this feature has ... a broad and compelling use case."
  • "MIDI is uncommon ... There are already few native apps that use MIDI. "

Mozilla is also not convinced MIDI is important.
  • " We’ve ... not seen much expression of interest from our developer community."
  • Mozilla would likely be interested if someone were to contribute implementation support, however.

Action Needed!


  • We need developers and software/hardware vendors to push browser vendors on the need for MIDI in the web platform.
  • Join mozilla.dev.platform mailing list to advocate, please!
  • Anyone interested in contributing implementation support to Mozilla, let me know.

We have backing within Chrome but need other vendors to believe MIDI is not a niche, and that there is a significant need.

End


Questions?

cwilso@google.com
@cwilso
webaudiodemos.appspot.com
+Chris Wilson