Tempo changes in NRT

So if I have a score like

(
x = Score.new;
SynthDescLib.all.at(\global).synthDescs.do { |sd|
  x.add([0, ['/d_recv', sd.def.asBytes ]]);
};
(0, 0.25..10).do { |time, i|
  var nodeID = 1000 + i;
  x.add([time, [\s_new, \default, nodeID, 0, 0, \freq, 110 * rrand(1, 8)]]);
  x.add([time + 0.05, [11, 1000 + i]]); // free
};
)

I can play it in real time on a clock with variable tempo:

(
x.play;
fork {
  loop {
    TempoClock.default.tempo = exprand(0.5, 2.0);
    1.wait;
  };
};
)

And I wonder, what is the best way to replicate this in NRT? I see that in Score:write, the clock’s tempo is taken as a constant:

tempoFactor = (clock ? TempoClock.default).tempo.reciprocal;

In the worst case, I can roll my own calculations of real start time given variable tempo… but it makes my head hurt to think about. Is there a better way?

There’s no clock in NRT rendering – tempo changes have to be factored into the message timestamps. Maybe someone made a helper class for that, but I don’t recall such a thing.

hjh