Skip to main content

hooks/useMIDIInput

Functions

useMIDIInput()

function useMIDIInput(
midiAccess,
onNoteOnEvent?,
onNoteOffEvent?,
onPitchBendEvent?): void;

Defined in: hooks/useMIDIInput.ts:20

Hooks for handling note on/off events. To be used with useMIDIAccess. Internally uses useMIDIMessage.

Parameters

ParameterType
midiAccessMIDIAccess | null
onNoteOnEvent?(note, velocity) => void
onNoteOffEvent?(note) => void
onPitchBendEvent?(msb, lsb) => void

Returns

void