例項屬性
此介面不實現任何特定的屬性,但繼承自 MIDIPort。
例項方法
此介面也繼承自 MIDIPort 的方法。
MIDIOutput.send()-
將訊息排隊等待發送到 MIDI 埠。
MIDIOutput.clear()-
清除佇列中所有待發送的資料。
示例
以下示例立即在 MIDI 通道 1 上傳送一箇中央 C。
js
function sendMiddleC(midiAccess, portID) {
const noteOnMessage = [0x90, 60, 0x7f]; // note on, middle C, full velocity
const output = midiAccess.outputs.get(portID);
output.send(noteOnMessage); // sends the message.
}
規範
| 規範 |
|---|
| Web MIDI API # MIDIOutput |
瀏覽器相容性
載入中…