1. Chrome Web MIDI 2015
- Web Music Developer Meetup@Sapporo -
Takashi Toyoshima <toyoshim@chromium.org>
2. Web MIDI API
MIDI: a real-time protocol to control music devices
❏ AMEI / MMA - MIDI (Original, USB, BLE, etc)
❏ W3C Audio WG - Web MIDI
Other APIs that may be used together
❏ Web Audio API
❏ WebRTC
❏ WebGL
3. Chromium / Blink
Chrome 43
shipped the Web MIDI API
❏ No more chrome://flags
❏ Chrome OS, Windows, OS X, Linux, and Android
❏ Chrome Apps will support SysEx from m46
4. Chromium-based Systems
❏ Android WebView
❏ PermissionRequest supports SysEx from m45
API level 22 defines RESOURCE_MIDI_SYSEX String
"android.webkit.resource.MIDI_SYSEX" is for others
❏ Opera
❏ Supports SysEx from maybe Opera 32
❏ Vivaldi
❏ No SysEx UI (chrome://settings/content works?)
❏ Electron
❏ Supports SysEx from v0.32.1
5. Other Browsers
❏ Web MIDI Browser for iOS
❏ w/ WebMIDIAPIShimForiOS
❏ By 水引さん
❏ FireFox
❏ Bug 836897 - Implement the WebMIDI API
❏ Kyle’s local build is working on OS X (tweet)
❏ IE / Edge
❏ Not currently planned (IE / Edge)
7. Recent Changes (from 43)
❏ Secure Origins are needed for SysEx requests
❏ Prefer Secure Origins For Powerful New Features
❏ Ask and remember for https, localhost, and so on
❏ Otherwise, blocks => will changed to ask always?
8. Spec vs Chrome
❏ MIDIPort#open(), close()
❏ MIDIPort#state: { “disconnected”, “connected” }
❏ MIDIPort#connection: { “open”, “close”, “pending” }
Works, but Chrome doesn’t release closed device on
Windows now.
❏ MIDIOutput#clear()
Not implemented yet.
9. Coming Updates
❏ Android Marshmallow native MIDI support
Under experiments with chrome://flags from m47.
It will support virtual and BLE MIDI.
❏ dictionary MIDIOptions {
boolean sysex;
boolean software;
};
To solve security problems on software synths.
10. Security Problems
❏ Microsoft GS Wavetable Synth
❏ Most famous MIDIOutput instance
❏ A user found a crash bug
❏ Normal messages can trigger this problem
❏ Chrome crashes inside a driver
Now the MS synth is blacklisted. But other virtual MIDI
drivers on Windows have the same security risk
potentially.
Will enable it again with software synth permission?
11. What’s the Next?
❏ Major GitHub Issues for v1
❏ Expose system-level grouping of MIDIPorts
❏ Expose the API to Web Workers
❏ GitHub issues for v2
❏ Virtual Ports registration