1 partial interface Navigator {
2 void requestMIDIAccess (SuccessCallback successCallback, optional ErrorCallback errorCallback, optional boolean systemExclusiveSupportRequested = false );
6 callback SuccessCallback = void (MIDIAccess access, boolean systemExclusiveAllowed);
9 callback ErrorCallback = void (DOMError error);
12 interface MIDIAccess : EventTarget {
13 sequence<MIDIPort> getInputs ();
14 sequence<MIDIPort> getOutputs ();
15 MIDIInput getInput (MIDIPort or DOMString or short target);
16 MIDIOutput getOutput (MIDIPort or DOMString or short target);
17 attribute EventHandler onconnect;
18 attribute EventHandler ondisconnect;
28 interface MIDIPort : EventTarget {
29 readonly attribute DOMString id;
30 readonly attribute DOMString? manufacturer;
31 readonly attribute DOMString? name;
32 readonly attribute MIDIPortType type;
33 readonly attribute DOMString? version;
34 attribute EventHandler ondisconnect;
38 interface MIDIInput : MIDIPort {
39 attribute EventHandler onmessage;
43 interface MIDIOutput : MIDIPort {
44 void send (sequence<octet> data, optional double timestamp);
48 interface MIDIMessageEvent : Event {
49 readonly attribute double receivedTime;
50 readonly attribute Uint8Array data;
54 interface MIDIConnectionEvent : Event {
55 readonly attribute MIDIPort port;