The send() method of the MIDIOutput interface queues messages for the corresponding MIDI port.
send()
MDN Reference