Here’s the slightly easier but less robust way, applied to Particles/sec:
max = 1000;
min = 0;
l = thisComp.layer("MyNullsName");
s = l.transform.position.speedAtTime(time - thisComp.frameDuration);
linear(s, min, max, 0, value);
‘max’ is the speed at which the emitter emits at its keyframed value and ‘min’ is the speed at which the emitter stops emitting (0 is stopped).
Here’s a more robust way that will allow for parenting of the Null that controls the emission:
max = 1000;
min = 0;
l = thisComp.layer("MyNullsName");
s = length(l.toWorld(l.anchorPoint) - l.toWorld(l.anchorPoint, time - thisComp.frameDuration)) / thisComp.frameDuration;
linear(s, min, max, 0, value);
Darby Edelen