Web MIDI API
SpessaSynth provides an easy way to connect physical MIDI Devices to it and back using MIDIDeviceHandler
.
Tip
If you encounter any errors in this documentation, please open an issue!
Initialization
Properties
inputs
The MIDI inputs as MIDIInputMap.
outputs
The MIDI outputs as MIDIOutputMap.
Methods
createMIDIDeviceHandler
Initializes the connection to physical MIDI Devices.
The returned value isboolean
, true if succeeded, false if failed. Info
This function is asynchronous.
connectMIDIOutputToSeq
Connects a Sequencer
instance to a MIDI Output, playing back the sequence to it.
MIDIOutput
to connect to. - seq - a Sequencer
instance to connect. disconnectSeqFromMIDI
Disconnects all MIDI devices from the sequencer.
- seq - aSequencer
instance to disconnect. connectDeviceToSynth
Connects a MIDI Input to a Synthetizer
instance, responding to all received messages.
MIDIInput
to connect. - synth - a Synthetizer
instance to connect to. disconnectAllDevicesFromSynth
Disconnects all MIDI Inputs from the Synthetizer
instance.
onmidimessage
property from the inputs.