Twelve Tones

2026 Digital,Vector

Twelve Tones

Twelve Tones: Pattern Mathematics

twelve-tones.ck runs 12 concurrent tone generators on different periodic cycles. Each cycle, every track picks one note uniformly at random from a 5-note pentatonic scale. Two independent questions live inside “how long until the piece repeats”:

  1. Rhythmic Recurrence: When all 12 cycles momentarily return to the same phase relationship they had at t = 0.
  2. Note-sequence Recurrence: When the exact sequence of chosen notes repeats.

The first is purely a property of the cycle lengths. The second depends on the random picks. They have very different answers!

1. Rhythmic Recurrence: The LCM

The 12 cycle times, in milliseconds, are:

TrackCycle (ms)Cycle (s)
T123 47023.47
T229 89029.89
T341 03041.03
T43 1703.17
T55 2305.23
T67 5107.51
T713 79013.79
T817 37017.37
T919 13019.13
T1011 59011.59
T1131 61031.61
T1237 27037.27

All are multiples of 10 ms. Pulling out that common factor and factoring the remainders:

n (= cycle / 10)factorization
2347prime
29897² · 61
410311 · 373
317prime
523prime
751prime
13797 · 197
17373² · 193
1913prime
115919 · 61
316129 · 109
3727prime

16 distinct primes appear across the 12 numbers, and most of them appear in exactly one track. The LCM is the product of each prime raised to its largest power anywhere in the list:

LCM / 10 = 3² · 7² · 11 · 19 · 29 · 61 · 109 · 193 · 197
         · 317 · 373 · 523 · 751 · 1913 · 2347 · 3727

Multiplying back the factor of 10 ms:

LCM ≈ 5.25 × 10³⁶   ms
    ≈ 5.25 × 10³³   s
    ≈ 1.66 × 10²⁶   years

The age of the observable universe is ~1.38 × 10¹⁰ years, so this rhythmicperiod is about 10¹⁶ ages-of-the-universe. Long.

Why It’s So Huge

The design principle is incommensurability: choose cycle lengths whose pairwise ratios don’t share small prime factors. The cycles 23.47, 29.89, 41.03, 3.17, … are deliberately not round numbers like 3, 5, 7, 11 s.

If the cycles were simple integers (3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41 s), their LCM would be their product (they’re all prime): about 1.5 × 10¹⁴ s ≈ 4.8 million years. Impressive, but ~19 orders of magnitude shorter than what we actually get. The trick of adding two decimal places of “prime-like” digits is where the extra 10¹⁹× comes from.

2. Note-sequence Recurrence

Timing alignment is not the same as pattern repetition. To produce the same musical piece twice in a row, the random pentatonic picks would also need to coincide.

Over a single rhythmic period, the total number of note events across all 12 tracks is:

Σ (LCM / cycle_i)  ≈ 5.6 × 10³³ individual random picks

Each pick is one of 5 pentatonic notes, uniform and independent. The probability that two full rhythmic periods produce the same sequence of picks is

(1/5)^(5.6 × 10³³)  ≈  10^(−3.9 × 10³³)

That is a number with roughly 3.9 × 10³³ leading zeros in decimal. It is not usefully distinguishable from zero by any standard a physicist, engineer, or cryptographer would accept.


So… How Long Does It Play Without Repeating?

Definition of “repeat”Answer
All 12 cycles re-align in phase1.66 × 10²⁶ years
The exact sequence of notes recursEffectively infinite

Is it Strictly Infinite?

Almost (with an asterisk)…

  • Practically: Yes. A note-level repetition requires both a rhythmic alignment (takes 10²⁶ years) and ~10³³ random picks coinciding inside that alignment. The joint probability is so far below any cosmological or combinatorial scale that “infinite” is the correct engineering word for it.

  • Mathematically: if Math.random2 were a true nondeterministic source (it isn’t, it’s a pseudo-random generator with finite state), note-pattern recurrence would have probability zero in finite time. The piece never repeats.

  • Strictly: because Math.random2 is a PRNG with some finite period P, the combined state (rhythmic phase, PRNG state) lives in a finite space. The ultimate recurrence time is bounded by the LCM × P, a finite but still astronomical number. Technically finite; practically infinite.

Interpretation

The piece is constructed so that within any human timeframe, a listening session, a human lifetime, the recorded history of the species, the current age of the universe, the probability of hearing any moment twice is negligible. “Incommensurable phasing” isn’t marketing; it’s the mechanism that buys those 10²⁶ years from only 12 generators and 12 seconds of rhythmic resolution.

The source code is available on GitHub.

Enjoy.