If the pipe is non-metalic, use a reluctance sensor, it will produce a voltage pulse as the ball passes it. This MAY work on some types of metalic pipes as well.
If the pipe is transparent, use an IR LED (NOT a TSOP type of device) and pass the light through the pipe to an IR phototransistor. If the IR beam is broken it will register on the phototransistor.
If the pipe is non-metalic and not transparent, you could also try a capacitive pick-up from one side of the pipe to the other.
If the ball is magnetic, you can use a pick up coil. It will induce a current in it as it passes by.
Don't use a TSOP style detector, they rely on the IR beam being chopped at around 38KHz or 56KHz and require several cycles to adapt before producing an output. As the ball may drop very quickly through their beam, it's likely they will not have time to react. A constant beam from a normal IR LED falling on a phototransistor will have a very much faster response time.
Brian.