Before thinking about code, what is the ratio of the two pulleys? You need that before anything else.
Remember, a stepper motor moves in steps, not RPMs. So you need to be able to smooth the stepping by using a spring loaded tension pulley to the design.