CIRCLES · the math · 1.0 and the dev build

Every player is a hand going round a circle

Each player is a hand turning on a circle, once per loop. Its notes are marks on the circle, and a note sounds when the hand passes its mark. One formula says how fast every hand turns. This page puts that formula first, then shows what each part of it does: what CIRCLES 1.0 uses, what the dev build adds, and what would fit but isn't in yet.

note played note folded back by a shorter length note skipped echo L0 beat dashed wave: where the player would be in step meetall players at the start of their figure
The formula

One formula for all of CIRCLES

dθi/dt = mi / (L0 · E · Ri) mi = 1 + δi + K · sin 2π(gi − θi) 0.5 ≤ mi ≤ 1.5 note k of player i sounds when θi passes ak / Ri (mod 1)

Read it as three sentences. The hand of player i turns once per loop. It turns at a speed of its own, m. Each note sounds when the hand passes its mark. Everything on this page is one of these symbols at work, so every section below starts with its piece of the formula, marked in colour.

θi
Where player i's hand is, in turns: 0 is the start of its loop, 1 a full round.
The circle.
In 1.0
L0
The conductor's length, the only beat CIRCLES has. Nothing pulls it.
CHOMPI + wheel. 2 s at power-on.
In 1.0
E
The ensemble length, one of the ten ratios: a tempo for everyone.
Switch on all, CHOMPI + black key.
In 1.0
Ri
The player's length, one of ten ratios from 1/3 to 3.
CHOMPI + black key.
In 1.0
ak
When note k came, counted from the figure's start in L0 · E. Its mark sits at ak / Ri of a turn.
The figure, kept with loop.
In 1.0
mi
The player's speed: 1 is in step. In 1.0 it is always exactly 1.
The three symbols below.
Dev build
δi
Detune: how much faster or slower the player wants to run.
Play held + wheel, 0.1 % a click, up to ±5 %.
Dev build
K
The pull towards the ghost, one amount for everyone.
On all, loop held + wheel. 4 % at power-on, up to 20 %.
Dev build
gi
The ghost, (B − hi) / Ri: where the hand would be had it stayed in step with L0. B counts L0 beats; hi is the beat its loop started on.
The dashed hand in the scopes.
Dev build

Two things sit outside the formula, as rules on top of it. Jumps: a new length (R changes), and in the dev build a kick, which moves the hand. Between jumps, the formula runs. The feel: it moves each mark a little at random and changes each note's loudness; the hand itself is never touched.

1.0 in one line. With m = 1 the formula solves itself: θi = (B − hi) / Ri, so note k of player i plays on the beats B = hi + (ak mod Ri) + n · Ri, for every whole n. Each player is a periodic signal and CIRCLES is their sum. The dev build makes m move, so the hand can leave its ghost and come back.

With m = 1: three loops add up

In 1.0
m = 1: θi = (B − hi) / Ri note k on the beats hi + (ak mod Ri) + n · Ri R = 1, 1, 5/4 together periodic, every lcm(1, 5/4) = 5 L0

Each scope runs live. Press Listen on one to hear it; only one plays at a time. The scopes run a small model in the browser, written to behave like the firmware, with a simple struck-bar sound.

The map

What math knows about periodic signals, and where CIRCLES stands

in 1.0dev buildnot in yetdoesn't fit
Part one

In CIRCLES 1.0

Lengths, windows, tempo, phasing by length, and the feel. Everything in this part is in the released firmware.

Period · frequency

Lengths are periods, and rational ones always meet

In 1.0
dθi/dt = 1 / (L0 · E · Ri) one turn takes L0 · E · Ri: that is the period R ∈ {1/3, 1/2, 2/3, 3/4, 1, 5/4, 4/3, 3/2, 2, 3} two players meet every lcm(p1/q1, p2/q2) = lcm(p1, p2) / gcd(q1, q2) L0
Math

A periodic signal is fixed by its period. Two periods in a rational ratio p/q line up again after their least common multiple, and the sum repeats from there.

In CIRCLES

The black keys (CHOMPI held): ten rational ratios, 1/3, 1/2, 2/3, 3/4, 1, 5/4, 4/3, 3/2, 2 and 3. Any two players meet again within 20 L0 (×5/4 against ×4/3 is the slowest pair); all ten lengths together repeat after 60 L0.

Period change · time scaling · time aliasing

R and E: two ways to change a period

In 1.0
player length: dθ/dt = 1 / (L0 · E · R) mark = ak / R mod 1 R in both: every note keeps its time, what lies past the end folds round ensemble length: dθ/dt = 1 / (L0 · E · R) mark = ak / R mod 1 E in the speed only: the marks stay, everything stretches
Math

Scale time and the whole waveform stretches. Or keep the waveform and change only the period: the signal is cut to a window and folded back, t mod T. That folding is time aliasing.

In CIRCLES

A player's length R is in both places, so they cancel: a note plays ak into the loop, as it was played, and a note past the new end folds round (the rings). The ensemble length E is only in the speed, so it is a tempo: everything stretches together. One side effect: a ×1 figure at length ×3 is a frequency divider, heard every third L0 with its shape intact.

Phase · what a length change does to it

Phasing in 1.0: a new length lands on the L0 beat and keeps the time

In 1.0
a new R on the next L0 beat: θ ← θ · Rold / Rnew the time in the loop, θ · R, is kept; the angle θ jumps after n L0 at ×5/4, back to ×1: θ − g = (n mod 5/4) mod 1 = 0, ¾, ½, ¼, 0 … for n = 1, 2, 3, 4, 5 the dev build: a new R waits for θ = 0, where both agree, so nothing jumps
Math

When a period changes there are two choices: keep the phase (the hand's angle) or keep the time since the loop began. Keeping the phase is true phasing: any shift is possible. Keeping the time means the angle jumps, because angle = time ÷ length.

In CIRCLES

1.0 keeps the time, and only on an L0 beat. So after a detour a copy lands on the L0 grid: back in step after 1 L0 at ×5/4, and a quarter, half or three quarters off after 2, 3 or 4 L0. ×4/3 gives thirds, ×3/2 halves, ×2 and ×3 always land in step. The dev build changes this (Part two): a new length lands at the player's own loop start and keeps its phase, so nothing jumps.

Noise · jitter

The feel is noise on phase and amplitude

In 1.0
mark = ak / Ri + ε |ε| ≤ 30 ms · feel, drawn anew each repeat loudness · swell · (1 − 0.35 · feel · u) skipped with p = 0.3 · max(feel − ½, 0) u, ε: random
Math

Random phase jitter, random amplitude and random dropouts. All of it is noise around a periodic signal; nothing here is periodic itself.

In CIRCLES

K2 with CHOMPI held. Drawn to scale: 30 ms is 1.5 % of a 2-second L0, so you hear it better than you see it. Above half, notes start to drop out. The swell, a slow drift of loudness, is random from round to round. The feel moves the marks, never the hand, so the jitter never adds up: each repeat is late or early against the player's own place, which stays where it is.

Part two

In the dev build

The dev build is in development. It gives every player a speed of its own, through one equation: players can drift, be kicked out of step, and find their way back. It also clicks on every L0 until the first figure is kept; L0 is the only beat CIRCLES has, so there is nothing else to count.

Phase

A kick changes a player's phase, not its figure

Dev build
θi ← θi − n/64 a jump of the hand; the marks stay one click of the wheel = a 64th of the loop
Math

Shifting a periodic signal in time moves its phase. On the circle the hand jumps forward or back against the marks; the marks themselves stay where they are.

In CIRCLES

Loop held + wheel kicks the chosen player a 64th of its length per click, right for later: its hand goes back a little, so its notes come later. With the pull on (below), it then drifts back towards its place; loop held + push lets it glide home. This scope shows the kick without the pull, so the copy stays where you put it. The dashed wave in the copy's row is its source: in step, the two waves lie on top of each other; after a kick they come apart. Time runs from the circles to the right, so the shift starts at the circle and travels across; what was already played stays as it was.

Continuous frequency · quasi-periodicity

Detune: speeds between the black keys

Dev build
mi = 1 + δi (K = 0) the hand gains δ of a turn on its ghost every loop back in step after 1/δ loops δ irrational: never exactly
Math

Frequency is continuous. Between the rational ratios lie ratios that never meet again, and the sum becomes quasi-periodic. A frequency that itself moves is a chirp, an accelerando; Nancarrow built tempo canons that way (not in CIRCLES).

In CIRCLES

Play held + wheel detunes the chosen player, 0.1 % a click, up to 5 % either way; play held + push makes it exact again. Piano Phase without hands: a copy drifts slowly through every phase against its source. This scope shows detune without the pull; with the pull on, a small detune locks instead (below). The dashed wave in the copy's row is its source: the copy's wave slides slowly away from it and comes back.

Phase-locked loops · Adler's equation

The whole speed: detune, pull, kick and the way home

Dev build
mi = 1 + δi + K · sin 2π(gi − θi) 0.5 ≤ m ≤ 1.5 gi = (B − hi) / Ri, the ghost, locked to L0 how far off, ψ = g − θ: dψ/dt = −(δ + K · sin 2πψ) / (L0 · E · R) Adler's equation |δ| < K: locks, asin(|δ|/K) / 2π of a turn off its ghost (fast: ahead, slow: behind) |δ| > K: slips round, lingering near home glide home: K → max(K, 0.3), δ → 0, until |ψ| < 1/256 not in yet (the last row): + C · Σj sin 2π(θj − θi), listening to each other, + σ · ξ(t), wander
The rules

The figure itself never changes; only when its notes come does. Time never runs backwards or stops: speed stays between half and one and a half. L0 is the conductor and is never pulled. Nothing jumps but deliberate acts: a kick, and a new length, which lands at the player's own loop start. The dashed hand on each circle is the player's ghost: where it would be had it stayed in step with L0, and the dashed wave is the ghost's shadow. The arc between hand and ghost is how far off it is.

In CIRCLES

The pull K is one amount for everyone: 4 % at power-on, switch on all + loop held + wheel, 0.5 % a click up to 20 %. Gliding home pulls with at least 30 % and ignores the detune until the player is within 1/256 of a turn. In this scope vibes is 2.5 % fast and the 4 % pull holds it, a little ahead of its ghost; kora is 5 % slow, more than the pull can hold, so it slips round about once a minute. The two sliders on the last row, listening to each other and wander, are not in CIRCLES (Part three).

Part three

Possible, not in yet

Each of these fits the math CIRCLES is built on. None is promised: a new idea goes in only after someone misses it while playing, and after it has been tried in a simulation of the firmware.

Coupled oscillators · Kuramoto model

Coupling: players that listen to each other

Not in yet
mi = 1 + δi + K · sin 2π(gi − θi) + (C/N) · Σj sin 2π(θj − θi) j: the players of the same length Kuramoto model order r = |mean e2πiθ|, 1 = all in step
Math

Slightly detuned oscillators that nudge each other's phase. With weak coupling they drift; above a threshold they lock. Clapping audiences, fireflies and pendulum clocks on one wall all do this.

What it would add

In the dev build every player is pulled towards its own ghost, never towards the others. Coupling would add a pull between players of the same length, so detuned copies find each other wherever they are, not only at home.

Symmetries of a periodic signal

Retrograde, inversion, transposition

Not in yet
retrograde: ak → R − ak inversion: pitch p → 2c − p transposition: p → p + k the hand's equation stays; only the marks and the notes change (1.0 has E, the tempo, and p → p + 12n, the octave; the dev build adds θ → θ − n/64, the kick)
Math

A signal can be mirrored in time and in value, and shifted in value, without changing its period. With time shift and scaling these are the moves that keep it recognisably the same figure. The spokes on the circles show pitch: longer is higher.

What it would add

A new figure from a kept one without playing it: the copy runs backwards or upside down. Canons have done this for six hundred years, and it suits passing figures around.

Modulation · LFO

Slow cycles on any knob, each on a period of its own

Not in yet
any knob of player i becomes a function of time: leveli(t) = level0 + d · ½ (1 − cos 2πt / Tm) Tm = n · L0, a period of its own, unrelated to R the whole repeats after the lcm of all periods
Math

A slow periodic modulation of any parameter. Each player then has two cycles: its figure, and a slow one over it. On level it's amplitude modulation (the wave's height); on the other knobs the dashed line shows it.

What it would add

Eno's Music for Airports: loops of unrelated lengths fading in and out, so the ensemble gets a long arc nobody has to play. Every player knob could take it: level, brightness, decay, strike, pan, feel. Periods counted in L0 keep it with the tempo. Today's swell is random per round, not a cycle.

Feedback · comb filter

Feedback: the figure echoes itself

Not in yet
on the sound, after the formula: y(t) = x(t) + g · y(t − D) D = L0 · E · r, so a new tempo moves the echoes with it
Math

A delay fed back into itself, a comb filter. In time every note gets a fading train of copies, D apart.

What it would add

A delay whose time is a ratio of L0, so it follows the tempo (try the ensemble length). With D at another ratio than the figure, the echoes make a second rhythm against it. One shared send for the whole ensemble would be enough; fifteen would cost too much.

Integer periods · Clapping Music

Lengths in pulses

Not in yet
Ri = n / 8, n = 1 … 24, instead of the ten ratios n against 8: the marks move one pulse a round, always on the pulse
Math

A finer set of rational periods with one common unit. Two periods of n and m pulses meet after lcm(n, m) pulses, and between meetings the offset moves in whole pulses, never between them.

What it would add

In C's odd lengths (7, 9, 11, 13 pulses) and Reich's Clapping Music in steps: 7 pulses against 8 moves one pulse per round. It deepens the idea of a length instead of adding a new one. The cost: ×4/3, ×2/3 and ×1/3 don't fit 8 pulses.

Hard sync

Hard sync doesn't fit CIRCLES

Doesn't fit
θi ← 0 on every L0 beat a jump on every beat: the hand never gets past its first L0
Math

On a synthesizer an oscillator's period sets how fast its waveform runs. A master restarts it every cycle, so a slave with another speed is cut at a different point of its wave, and sweeping its speed sweeps the sound.

Why not here

In CIRCLES a length doesn't change how fast the notes run; it only sets the window. Restarting every figure on the L0 beat would just play its first L0, which is length ×1 without the folding. It adds nothing, so it stays out.

In short

Where CIRCLES stands

In 1.0 the speed m is always 1 and the formula solves itself. The dev build lets m move. What is not in yet would add a term to m, or change the marks, the knobs or the sound.

In 1.0

Periods as ten rational ratios of one L0; a length is a window, the ensemble length a tempo; phasing by length, on the L0 grid; copy and octave; the feel as noise on time and loudness.

Dev build

A speed of its own for every player: detune, a pull towards its ghost, kicks and a glide home; a new length lands at the player's own loop start; a click on L0 until the first figure.

Not in yet

Coupling between players, wander, retrograde and inversion, slow cycles on any knob, a delay timed in L0, lengths in pulses.