Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/midi/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  refresh_port_list.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/midi/tests/refresh_port_list.html


<!DOCTYPE html>
<html>
<head>
<title>Refresh MIDI port list test</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta>
</head>
<body>
<script>
  var access = null;
  async function get_access() {
    access = await navigator.requestMIDIAccess({ sysex: true });
  }

  async function reset_access() {
    access = null;
  }

  async function get_num_ports() {
    return access.inputs.size + access.outputs.size;
  }

  async function add_port() {
    let addPortPromise = new Promise(resolve => {
      access.addEventListener("statechange", (event) => { dump("***** 1 event.port.name = " + event.port.name + "event.connection = " + event.port.connection + "\n"); if (event.port.connection != "open") { resolve(); } });
    });
    const outputs = access.outputs.values();
    const output = outputs.next().value;
    output.send([0x90, 0x01, 0x00]);
    await addPortPromise;
  }

  async function remove_port() {
    let removePortPromise = new Promise(resolve => {
        access.addEventListener("statechange", (event) => { dump("***** 2 event.port.name = " + event.port.name + "event.connection = " + event.port.connection + "\n"); if (event.port.connection != "open") { resolve(); } });
    });
    const outputs = access.outputs.values();
    const output = outputs.next().value;
    output.send([0x90, 0x02, 0x00]);
    await removePortPromise;
  }

  async function force_refresh() {
    const outputs = access.outputs.values();
    const output = outputs.next().value;
    output.send([0x90, 0x04, 0x00]);
  }
</script>
</body>
</html>

Messung V0.5
C=96 H=93 G=94

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.