Ideally if I could link the speed to a slider on a null object that would be great!
Not with this method. You'd have to use something with valueAtTime() and actively manipulate the timescale. anyway, you are missing the obvious: Pre-compose, use time-remapping.
I can't pre comp because I'm applying the changes on an adjustment layer and I don't want the footage underneath to speed up.
I'll try the other way thanks
The easiest way to achieve this effect is to precompose the layer you want to effect, or the layer you want to effect and the adjustment layer, then time remap the Pre-comp.
From the description, and from my experience, there's nothing that pre-composing should break in your project. If you want the background to remain unaffected then don't include it in the pre-comp. If there's an effect, say something like a glow bouncing exposure that you're applying to some background footage then you can simply Pre-compose your adjustment layer with the LoopOut expression, collapse transformations, turn the Pre-comp into an adjustment layer, then Time Remap and use the graph editor to adjust the ramp.
This will keep the background footage playing in real time but ramp up the pingpong loop.
Hope this helps.Here's a CS5 project to show how it's done.
collapsing transformations was the what I was after. Forgot about that