Maybe this older fun project (2002) of mine, "TclMusic" http://wiki.tcl.tk/3977 could be revived on the Pi? Tcl and Tk are already in Raspbian, but I'll have to see what library I can find (or make) for sound output.
Notes in text notation and graphic rendering, a small piano keyboard to play on, and then MIDI output...