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