aboutsummaryrefslogtreecommitdiff
path: root/files/nl/web/api/midiaccess/index.html
blob: 2bc42f75faeaa4c75d3f8cd89481a0f272f51960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: MIDIAccess
slug: Web/API/MIDIAccess
translation_of: Web/API/MIDIAccess
---
<p>{{SeeCompatTable}}{{APIRef("Web MIDI API")}} </p>

<p>The <strong><code>MIDIAccess</code></strong> interface van de  <a href="/en-US/docs/Web/API/Web_MIDI_API">Web MIDI API</a> geeft u methodes om aangesloten MIDI in- en uitgangen weer te geven en te ondervragen.</p>

<h2 id="Properties">Properties</h2>

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

<h3 id="Event_Handlers">Event Handlers</h3>

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

<h2 id="Voorbeelden">Voorbeelden</h2>

<pre class="brush: js">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);
     };
  });</pre>

<h2 id="Specificaties">Specificaties</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('WebMIDI API','#midiaccess-interface')}}</td>
   <td>{{Spec2('WebMIDI API')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibiliteit">Browser compatibiliteit</h2>

<p>{{Compat("api.MIDIAccess")}}</p>