Well, what exactly do you want to build: an end-user
application or a
performance environment, installation ?
My intention was to build an end-user application.
One plays notes on the keyboard and it memorizes and shows them on a
staff. There you can modify the duration of a note and other things
and then playback.
I wanted to implement some other functions: for example, one before
choose the notes on the staff, the program plays it but with no sound
and you have to follow the note and it tells you the errors in playing
them. For example, wrong notes, bad timing...
And well, I don't know yet what else. I have to think.
ad 1) see the other answers
ad 2) use pd (pure data), supercollider or something similar
I installed pure-data yesterday, but I have to learn using it and I'm
not sure if it will be of some help.