In 2005 I became interested in computer-generated music, and wrote this little program in Actionscript. It plays the piano with the notes/scale you specify (click on the keyboard to change note choice), with configurable tempo, range, and number of voices.
I was really happy to recover this from an old hard drive today. It still works beautifully, 6 years later! Next, I'd like to write a native program that generates midi signals/files, with better visualization and control.