Before you start recording, make sure you connect a music keyboard to your computer and create a software instrument track to record to. You should also familiarize yourself with how to use musical typing and the onscreen keyboard.
Select the software instrument track you want to record to.
Move the playhead to the point in the ruler where you want to start recording.
Logic Pro includes a metronome, which plays a steady beat to help you play in time while recording. You can turn this on or off using the Metronome button
in the control bar.
Click the Count-in button
in the control bar to have the metronome play a predefined count-in before recording starts.
Note: For the initial setup, choose Record > Count-in, then choose a measure.
Click the Record button
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 region on the track as you record.

Click the Stop button
in the control bar (or press the Space bar) to stop recording.