Interface MIDIEvent

A MIDI event payload.

Hierarchy

  • BaseInputEvent<"midi">
    • MIDIEvent

Properties

Properties

data: Uint8Array

The binary MIDI message.

The first byte is a status byte (first/most significant bit = 1), the remaining bytes are data bytes (first/most significant bit = 0).

To give a simple example, pressing C5 on a MIDI keyboard would generate the following message:

[0x90,     0x48,     0x64]
Ch.1 Note 72 Velocity 100
NoteOn i.e. C5

The note values can be looked up online:

Same goes for a full description of the packet structure:

source: string | number

The identifier, unique per client + device combo.

type: "midi"

The event type.

Generated using TypeDoc