partial interface Navigator { void requestMIDIAccess (SuccessCallback successCallback, optional ErrorCallback errorCallback, optional boolean systemExclusiveSupportRequested = false ); }; callback SuccessCallback = void (MIDIAccess access, boolean systemExclusiveAllowed); callback ErrorCallback = void (DOMError error); interface MIDIAccess : EventTarget { sequence getInputs (); sequence getOutputs (); MIDIInput getInput (MIDIPort or DOMString or short target); MIDIOutput getOutput (MIDIPort or DOMString or short target); attribute EventHandler onconnect; attribute EventHandler ondisconnect; }; enum MIDIPortType { "input", "output" }; interface MIDIPort : EventTarget { readonly attribute DOMString id; readonly attribute DOMString? manufacturer; readonly attribute DOMString? name; readonly attribute MIDIPortType type; readonly attribute DOMString? version; attribute EventHandler ondisconnect; }; interface MIDIInput : MIDIPort { attribute EventHandler onmessage; }; interface MIDIOutput : MIDIPort { void send (sequence data, optional double timestamp); }; interface MIDIMessageEvent : Event { readonly attribute double receivedTime; readonly attribute Uint8Array data; }; interface MIDIConnectionEvent : Event { readonly attribute MIDIPort port; };