Not too sure I truly understand either…. But, do you mean something like a conditional statement to use certain value if the statement is true and false value if otherwise? And expression like:
if( $T > 0.5, TRUE_VALUE, FALSE_VALUE )
in your parameter, perhaps?
Or do you mean something else complete different as in doing with algorithm in C/C++ with OpenGL, math, and such?
Or alternatively, using HScript? Or even PERL/C++/Java/<whateverLanguageYouCanName> to control your HScript or session via hcommand? Or Unix SOP even?
Otherwise, CHOP could be a very good option too.

Oh, there is a global variable for time: $T.
$T == current time (in seconds)
$F == current frame (in interger)
$FF == current frame (in floating point)
$NFRAMES == total number of frames in your range
When you set couple of keyframes within your animation curve, you can select a particular keyframe and input your expressions. For the duration of that particular range (between this keyframe and the next) will utilize your expression before going onto the next set of expression. However, this approach can be restrictive and you'd probably have to deal with the transition between this expression and next. But otherwise, you can use the conditional statement in your expression.
Hope that clarify a bit.

-Alex