What's actually inside a MIDI file, and how playback works
A MIDI file doesn't contain audio. It stores a list of note-on and note-off events, their timing, velocity and which instrument each track is assigned to, plus tempo and time-signature markers in its header. This player reads that header to show duration, BPM and time signature, then lists every track with the instrument name it declares and how many notes it contains, all before you've pressed play.
Sound only exists once something renders those events into audio, and the instrument doing the rendering decides what it sounds like. This player uses spessasynth, a SoundFont synthesizer that runs in the browser, with the FluidR3Mono General MIDI sound bank: 128 instruments plus drum kits. Each track plays on the instrument the file names, so strings sound like strings, bass like bass, and channel 10 plays a real drum kit. The bank is about 14.6 MB, loads when you pick a file and is cached afterwards.