Notice the "Play" and "Stop" buttons! All this is thanks to LilyPond. Yes, LilyPond generates MIDI files, as well as PDF files. Truly awesome. And the above actually works, I can generate and play Bach in NetBeans.
The above was generated as described here:
A great resource: http://www.mutopiaproject.org