Skip to content
Tone.js

Ticker

internal class

A class which provides a reliable callback using either a Web Worker, or if that isn’t supported, falls back to setTimeout.

new Ticker(callback: () => void, type: TickerClockSource, updateInterval: number, contextSampleRate?: number)

Parameters

  • callback () => void
  • type TickerClockSource
  • updateInterval number
  • contextSampleRate number optional

The type of the ticker, either a worker or a timeout

updateInterval: number

The rate in seconds the ticker will update

dispose(): void

Clean up