Guy's, just need some general pointers on how to move something forward. I don't want to go into actual code at this time for personal reasons, more simply for guidance as to what to use

Lets say I had a routine that calculated a value and then I used that value in a pause statement to control how long a pin remains high. This works fine for one output and is achieving the desired result in my tests. However I now want to replicate this 4 times, which causes me a slight problem.

If I had something like:

Calculate value 1
Calculate value 2
Calculate value 3
Calculate value 4

high pin 1
pause value 1
low pin 1

high pin 2
pause value 2
low pin 2

etc etc

The problem is that the total time all pins are off is the sum of all the other pause values. ie pin one is low for pause value 2 + value 3 + value 4. This is not what I want. I want to have pin 1 pulse at the rate set by value 1 and pin 2 at the rate set by value 2 etc etc..

What would be the the best way forward.