340 Drive Issues

What would make a car shutoff when it's in drive? My idle is so rough and horrible sounding when I put the car from park or neutral to Drive and even worse for reverse
Any ideas?