Bad spin cycle at stop light

I have a 2000 Hyundai Tiburon the car runs fine except when in drive with the brake on then it idles very rough; as at a stop light. Park, reverse neutral, drive without brake runs smooth.

You may have a leaking vacuum booster. You should check into this because you may suddenly lose all power assist when braking.