In the case of dosbox-x, I isolated a midi bug to a 1/20/14 commit (linewise=true by default). I have a build from that time which produces a midi bug where linewise=true but plays midi normally where linewise=false.
There is a pre-built dosbox-x binary from 4/26/14 that does not show the above behavior, but I can't draw a conclusion until building that version with mingw32.
On June 27th, the linewise option was removed entirely; so, the newest Ykhwong's build does not have the option to run linewise=false and test the above fix.
It is possible that the midi bug related to the linewise setting on 1/20/14 is different from the midi bug in the recent version of Ykhwong's. However, it is a place to start. Also, even if there are multiple ways to result in the midi bug (where the midi music frequently does not start playing), the above shows that other parts of the emulation may influence the midi music.
It suggests that Ykhwong could try reverting dosbox-x import to 1/20 or 4/26 and test the linewise modes and midi playback. Then, it would be possible to move forward in commits from that point, one month at a time.
Edit: test with this build: http://hackipedia.org/Projects/DOSBox-X/dosbo … 83e1c-win32.zip. That's the same version as imported to Ykhwong's.