In the past I've written basic MIDI software that captures keystrokes. It supports polyphonic live playback, instrument switching, recording to a MIDI file, and even a sustain pedal. It uses the system MIDI synthesizer for playback. If there is sufficient interest, I could open a project topic for it.