In Logic Pro, select the software instrument track you want to record to.
Move the in the control bar (or press R) to start recording.
Use your MIDI keyboard, Musical Typing window, or onscreen keyboard to play some notes.
The recording appears as a new MIDI PDF
Logic Pro Instruments: PDF