MIDIPort

The MIDIPort interface of the Web MIDI API represents a MIDI input or output port. Available only in secure contexts.

MDN Reference

Inheritors

Properties

Link copied to clipboard

The connection read-only property of the MIDIPort interface returns the connection state of the port.

Link copied to clipboard
external val id: String

The id read-only property of the MIDIPort interface returns the unique ID of the port.

Link copied to clipboard
external val manufacturer: String?

The manufacturer read-only property of the MIDIPort interface returns the manufacturer of the port.

Link copied to clipboard
external val name: String?

The name read-only property of the MIDIPort interface returns the system name of the port.

Link copied to clipboard

The state read-only property of the MIDIPort interface returns the state of the port.

Link copied to clipboard
external val type: MIDIPortType

The type read-only property of the MIDIPort interface returns the type of the port, indicating whether this is an input or output MIDI port.

Link copied to clipboard
external val version: String?

The version read-only property of the MIDIPort interface returns the version of the port.

Functions

Link copied to clipboard
inline suspend fun MIDIPort.close(): MIDIPort

The close() method of the MIDIPort interface makes the access to the MIDI device connected to this MIDIPort unavailable.

Link copied to clipboard
external fun closeAsync(): Promise<MIDIPort>

The close() method of the MIDIPort interface makes the access to the MIDI device connected to this MIDIPort unavailable.

Link copied to clipboard
open external fun dispatchEvent(event: Event): Boolean
Link copied to clipboard
inline suspend fun MIDIPort.open(): MIDIPort

The open() method of the MIDIPort interface makes the MIDI device connected to this MIDIPort explicitly available.

Link copied to clipboard
external fun openAsync(): Promise<MIDIPort>

The open() method of the MIDIPort interface makes the MIDI device connected to this MIDIPort explicitly available.

Link copied to clipboard
external fun <T : Event> when(type: EventType<T>, options: ObservableEventListenerOptions?): Observable<T>