Two small example programs where SuperCollider is controlled by MIDI.
Control parameters of a wind noise via MIDI controllers
Use UGens as instruments,
which will be played upon MIDI messages that arrive through ALSA.
This way you can play MIDI files using pmidi
or you can use your computer as MIDI expander controlled by a keyboard.