In Logic Pro, click the ruler where you want to start recording.
Click the Record button connect a music keyboard to your computer. Also, follow the procedures outlined in Track inspector for each software instrument track, use the MIDI In Port and MIDI In Channel pop-up menus to choose a unique MIDI port and (optionally) a MIDI channel that matches the MIDI output port and channel for the MIDI input device sending to that specific track. For more information about track parameters, see playhead to the point in the PDF
Logic Pro Instruments: PDF