1. Getting a MIDI connection between your Yamaha P-155 and computer
You'll need a USB MIDI interface to connect the DIN MIDI ports on your Yamaha P-155 keyboard to a USB port on your computer.
More information: You can't use a USB A port to connect to a "computer host".
In general, USB A ports (flat rectangle shape) are on the end of a connection that acts as a "computer host", and USB B ports (square shape) are on the end of a connection that acts as a "peripheral device".
Yamaha keyboards typically have one or both of these kinds of USB ports on them:
a USB A port labeled "TO DEVICE" to connect USB thumb drives or other storage devices.
a USB B port labeled "TO HOST" to connect to a computer for USB MIDI communications.
Since your keyboard only has a USB A "TO DEVICE" port, you'll have to use your keyboard's DIN MIDI ports for MIDI communications. You'll need a USB MIDI interface to connect your keyboard to your computer, as shown in page 50 of the manual
. (Actually, page 50 of the manual is kind of confusing, it seems to say there are "two ways" to connect to a computer, but both ways described seem to be exactly the same thing -- use a USB MIDI interface to connect the DIN MIDI ports on the keyboard to a USB port on the computer.)
2. Record MIDI percussion sounds in GarageBand.
I'm a little unclear on how to tell GarageBand you want to record MIDI notes and have them sound like a drum kit, but I think you should try to create a "software instrument track" and select a "drum kit patch":
Intro to tracks in GarageBand on Mac
Intro to patches in GarageBand on Mac
You don't want to hear any sounds from your Yamaha P-155 keyboard as you play so you can either turn its volume all the way down, or set its Local Control mode off. (In the manual
, see "Basic Procedure in Function" on page 39 for how to select functions, then read the description of function "F7.3 Local Control ON/OFF" on page 44.)