MIDI CC TempoClock control

I want to use a MIDI controller to be able to change the tempo while i execute Pdefs running Pbinds.
I tried this below, but it did not quite work (Pbinds went mad). What am i missing?
Thanks,

MIDIIn.connectAll;

(
MIDIdef.cc(\tempoControl, { arg val;
    var tempo = val.linlin(0, 127, 10, 200); 

    TempoClock.default.tempo = tempo;
}, 1).permanent_(true); 
)

TempoClock’s tempo is in beats per second, not per minute. 10 bps = 600 bpm (and that’s your minimum), unlikely this is what you meant.

In general, TempoClock.tempo = myBpm / 60 – it’s just a reflex for me now to add the / 60.

hjh

DOH!! totally missed that.
thank you!!