There are beta packages for MIDI and  MIDI-over-Bluetooth package for the Javascript Blocks Editor

And here's an example of Bletooth MIDI

And you can also program with Bluetooth MIDI in Swift

There are also some great articles about MIDI on this community website. There is an example reusable MIDI class (built using the same hardware as above).

Further Information

The GM 1 sound set defines a set of common instruments:

Keywords for search: control a MIDI instrument from the micro:bit, Does the micro:bit support MIDI