MP3 is proprietary. You should avoid using it.
WAV will work, but it's a bit bloated for projects and is more useful to store a raw source for the audio created. OGG is old enough just about anything should be able to support it. Even old school WInamp can support it. The only issue I have with MIDI is it depends on what sort of sound font is setup on the player end (Yeah, I know, people get irate for me calling it that, but I'm going with that because it's easier to understand). Like, with me, I have a custom font setup because I have worked with MIDI before, so the file would sound quite different on my end as opposed to someone using a default setup.
Mine is almost unheard of here, but I use web oscillator for my projects. I have been working with it over the years to try to make custom waveforms that sound a little more like actual instruments (I do have a fairly mean-sounding bass and pipe organ waveform) and it has a ridiculously low filesize since it uses the web browser itself to generate and play the music.