How to play MIDI notes from a browser on the computer’s audio [closed]

I know that using JavaScript, with certain libraries such as html-midi-player, on a website, you can load and play MIDI files (see MIDI music support in HTML5). These can sound quite realistic, with different instruments.

I want to be able to play individual notes, for example, turning a computer keyboard into a piano keyboard of sorts. Are there any JavaScript libraries or just JavaScript techniques that can single out individual notes (instead of playing a whole midi file)?

I have not been able to find something like that, but it seems it should be doable.