code: function(newTempo) {
    clock.timeStretch(context.currentTime, [freqEvent1, freqEvent2], currentTempo / newTempo)
    currentTempo = newTempo
  }
docs: To change the tempo, we use the function `Clock.timeStretch`.