I think there’s a typo in the docs where it says param:set('clock_tempo',50) I believe it should be params:set('clock_tempo',50).
Thanks for the great example! I was bugged down by the thought of building huge scripts from the ground up so getting this wake-up call was really inspirational.