This will be a bit technical. For those who have driven a stick/standard transmission car, this will be more easy to understand.
A transmission is what connects an engine, to the drive wheels making them spin (thus moving your car). Now if the engine is connected to the wheels, then when the engine speeds up the wheels speed up, and the reverse thereof.
If the wheels stop, and the engine is connected to them, the engine stops. So why does the engine keep going when you stop at a red light?
On a standard/stick shift car, you push the clutch. By pushing the clutch pedal, you are disconnecting the engine from the wheels. This allows the engine to run freely while the wheels are stopped.
On a automatic transmission, you have a device called a torque converter. A real simple explaination is picture two box fans. On facing the other. One pluged in and running, is blowing air into the other, which is not plugged in. What happens? The other spins from the air moving through it.
This is kind of how a torque converter works. The engine drives one "fan" and the other "fan" is connected to the wheels. As one drives the other, your car moves. But just like the box fans, if you stop one fan with your finger, the blowing fan does not. Similarly even though you leave your engine in drive, and you stop at a red light, the engine does not stall out.
Now this is good for stopping, but on the highway, this system is not efficient. So there is an extra part called the torque converter clutch. This, just like a clutch in a stick shift car, locks the engine to the wheels.
So here comes the part you want to know: What's wrong?
Most all torque converter clutches are run by computer since the early 80s. The computer does this by powering a valve that opens and causes the clutch to lock up. When you brake or let off the gas, the valve should de-power and close, causing the clutch to release.
If it does not, then you get funny things happening when you stop (engine wheels locked together, wheels stop, engine stops). This is bad for you engine, and bad for your transmission. This is the common problem as valves tend to get stuck open when they go bad.
I had a Chevy Lumina which did this. The valve went bad, and was very easy to replace. There was a access port on the side of transmission, and the valve was only about $50 bucks.
Here's the key to you: The valve could get stuck open, and the valve could be sending bad vibes to the computer which caused the P0740. Or there could be a sensor that is giving bad info to the computer making it think the valve is messed up when it isn't. The noise you hear could be the clutch, from not releasing (bad valve), or it could be the computer putting the transmission in fale safe mode (which sometimes make noises).
Advice: If you can determine for certain it's a bad valve, it might be easy to replace. I do not know your specific transmission, so you'll have to do some research on how hard it is.
IF YOU DO NOT KNOW... for certain, your best option is to take it to a dealership. It could be a sensor gone bad, a bad computer, or a bad valve... there's also an off chance it could be something unrelated like wiring and such. You'd end up doing the part swap guess game that costs so many so much money.