Connect an audio interface to your computer, using either a USB cable or a FireWire cable, depending on the make and model of the interface. The audio interface enables you to record directly to your computer, via either an instrument cable or microphone.
Connect a MIDI controller to the computer via a USB cable. MIDI controllers, such as keyboards and drum machines, let you trigger sounds saved in the digital audio workstation remotely. This lets you "play" the stored sounds live.
Connect your preferred audio source to the audio interface. For example, if recording an acoustic guitar, acoustic drum, piano or hand-percussion instrument, use an XLR cable to connect a microphone. If recording a synthesizer, electric guitar or electric bass, use a 1/4-inch jack cable.
Double-click the desktop icon to launch your preferred digital audio workstation, for example Pro Tools or Logic.
Launch a new session from the "File" menu.
Audition the sound. Play the instrument as loud as you intend to record. If the volume units meter on the front of the audio interface flashes red, this is a warning that the signal is too strong and will distort when recorded. Adjust the "Gain" dial to mitigate this. Aim for the loudest possible volume level before distortion to get the best recording.
Click "File" and select "New Audio Track." This opens a new channel and assigns the audio interface as the primary input device.
Hit "Record" to capture the instrumental sound.
Add your preferred effects. Open the "Effects" menu and select from the drop-down menu. For example, to give a sound more resonance and ambiance, add "Reverb." To create echoes and slap-back effects, add "Delay." To alter the pitch of the sound, select "Pitch Shift."
Click "Save As" and name the file.
Click "File" and select "Export." Select your preferred file type, for example .wav or .mp3 and save to a convenient location on your computer.
Open a MIDI channel in the digital audio workstation interface. Typically, you do this from the "File" menu, although some programs, such as Logic, have a shortcut tab.
Open the instruments menu and select "External Sample." Browse for the sound you exported and import it back into the workstation interface as a sample. This assigns the recorded sound to a MIDI channel. Hit a pad or key on the connected MIDI controller to trigger the pre-recorded sound.