ps Open the help file and look at the bottom, with a keyboard and a noteout object. Or, look at Max MIDI Tutorial #2, from the Max Tutorials in the help menu. Or, copy and paste this blob into your patch:
-- Pasted Max Patch, click to expand. --
Copy all of the following text. Then, in Max, select New From Clipboard.