midi/message
Interfaces
MIDIMessageInstance
Defined in: dom/src/midi/message.ts:1
Properties
destroy
destroy: () => void;
Defined in: dom/src/midi/message.ts:4
Returns
void
update
update: (onMIDIMessage) => void;
Defined in: dom/src/midi/message.ts:3
Replace the handler, keeping the listeners in place.
Parameters
| Parameter | Type |
|---|---|
onMIDIMessage | (event) => void |
Returns
void
Functions
createMIDIMessage()
function createMIDIMessage(midiAccess, onMIDIMessage): MIDIMessageInstance;
Defined in: dom/src/midi/message.ts:17
Listen to raw midimessage events on every input of a MIDIAccess.
The set of inputs is followed rather than sampled: MIDIAccess fires
statechange when a device is plugged in or unplugged, and the listeners
move with it. A keyboard connected after access was granted works without
the caller having to rebuild anything.
Use this when you need more detail than createMIDIInput provides.
Parameters
| Parameter | Type |
|---|---|
midiAccess | MIDIAccess | null |
onMIDIMessage | (event) => void |