2001 BMW E90 320i

My BMW has a ping noise when I drive and change gears, and it feel like it the car is holding back on the power which is not the way that it use to be when I drove it previously. I am not sure what the cause could be but it has started doing this all of a sudden.