From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/nl/web/api/midiaccess/index.html | 63 ++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 files/nl/web/api/midiaccess/index.html (limited to 'files/nl/web/api/midiaccess') diff --git a/files/nl/web/api/midiaccess/index.html b/files/nl/web/api/midiaccess/index.html new file mode 100644 index 0000000000..2bc42f75fa --- /dev/null +++ b/files/nl/web/api/midiaccess/index.html @@ -0,0 +1,63 @@ +--- +title: MIDIAccess +slug: Web/API/MIDIAccess +translation_of: Web/API/MIDIAccess +--- +

{{SeeCompatTable}}{{APIRef("Web MIDI API")}} 

+ +

The MIDIAccess interface van de  Web MIDI API geeft u methodes om aangesloten MIDI in- en uitgangen weer te geven en te ondervragen.

+ +

Properties

+ +
+
{{domxref("MIDIAccess.inputs")}} {{readonlyinline}}
+
Geeft een instance van {{domxref("MIDIInputMap")}} voor toegang voor een aangesloten MIDI ingang.
+
{{domxref("MIDIAccess.outputs")}} {{readonlyinline}}
+
Geeft een instance van {{domxref("MIDIOutputMap")}} voor toegang voor een aangesloten MIDI uitgang.
+
{{domxref("MIDIAccess.sysexEnabled")}} {{readonlyinline}}
+
Een boolean attribuut waaruit men kan aflezen of er een MIDI toegang is met System Exclusive mogelijkheden.
+
+ +

Event Handlers

+ +
+
{{domxref("MIDIAccess.onstatechange")}}
+
Wordt aangeroepen als er een verandering is in de lijst van aangesloten MIDI apparaten (of er een nieuw MIDI apparaat is toegevoegd of verwijderd).
+
+ +

Voorbeelden

+ +
navigator.requestMIDIAccess()
+  .then(function(access) {
+
+     // Geef een lijst van aangesloten MIDI controllers
+     const inputs = access.inputs.values();
+     const outputs = access.outputs.values();
+
+     access.onstatechange = function(e) {
+
+       // Print information about the (dis)connected MIDI controller
+       console.log(e.port.name, e.port.manufacturer, e.port.state);
+     };
+  });
+ +

Specificaties

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('WebMIDI API','#midiaccess-interface')}}{{Spec2('WebMIDI API')}}Initial definition.
+ +

Browser compatibiliteit

+ +

{{Compat("api.MIDIAccess")}}

-- cgit v1.2.3-54-g00ecf