I’m always happy to see that massive permutations are being undertaken. Here’s one for the musical realm: http://midnightsledding.com/q37/vt1c.html – a musical score generator by Erik Carlson. I believe it’s capable of generating around 2^875 scores.
There is software that recognizes the musical notation so that it can be converted to any format: this is called Music OCR.
There are also two free, open source programs, Audiveris and Open OMR. Audiveris exports the music to a MusicXML file, but it should be converted to MIDI without any problem, and Open OMR plays the sound