Tone.Pattern Playback Patterns in Tone.js

This article provides a clear guide to the playback patterns supported by the Tone.Pattern class in Tone.js. It explains how each pattern traverses an array of values—such as musical notes—to help you build dynamic arpeggios, generative melodies, and structured sequences in your web audio applications.

The Tone.Pattern class in Tone.js is designed to cycle through an array of values using a specified playback mathematical pattern. By default, it uses the "up" pattern, but you can configure it with several other built-in pattern types to change how the array is traversed.

Below are the supported playback patterns you can pass into the pattern parameter of a Tone.Pattern instance.

Standard Directional Patterns

Bounce Patterns (With Repeat Endpoints)

Alternate Patterns (Without Repeat Endpoints)

Random and Algorithmic Patterns