> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nomn.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# Rhythm Engine

> 18 rhythm generation techniques with compositional lineage

# Rhythm Engine

The Rhythm Engine determines *when* notes occur. It generates a stream of attack times and durations in real-time, synchronized to DAW transport via PPQ (pulses per quarter note) timing.

All 18 techniques are **streaming** — they maintain internal state and produce the next event on demand in O(1) time, enabling sub-10ms latency.

## Rhythm Techniques

| #  | Technique              | What It Does                                                                                                                                                                                                                                                                                                                                                                                                                        | Lineage                                                                                                                                                                                                          |
| -- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0  | **Stochastic**         | Exponentially-distributed random inter-onset intervals within the density range. No periodicity, no pattern — pure stochastic time points.                                                                                                                                                                                                                                                                                          | *Xenakis, Formalized Music (1963). Poisson processes applied to temporal distribution of sound events.*                                                                                                          |
| 1  | **Polyrhythm**         | Superimposes two periodic cycles at ratio A:B, producing composite rhythms from their intersections. Multiple sub-modes (Sum, Difference, Fractioned, Superimpose, Paired) plus optional phasing and synchrony detection. Uses LCM-based cycling for proper Schillinger resultant patterns.                                                                                                                                         | *Schillinger, The Schillinger System of Musical Composition, Book I: Theory of Rhythm. Resultant rhythms from interference of generators. Steve Reich phasing (Piano Phase, 1967) when phasing is enabled.*      |
| 2  | **Grouping**           | Notes cluster into groups of varying sizes (e.g., 5-3-2), then disperse. Creates rhythmic cells with internal acceleration and deceleration. Configurable group pattern and grouping mode (by product, by generator).                                                                                                                                                                                                               | *Messiaen, added values and non-retrogradable rhythms. The Technique of My Musical Language (1944). Schillinger Ch 3, grouping by ratio.*                                                                        |
| 3  | **Cloud**              | Stochastic density field modulated by overlapping sine waves at incommensurate frequencies. Creates regions of rhythmic concentration and rarefaction — dense clusters dissolving into sparse scatter.                                                                                                                                                                                                                              | *Xenakis, stochastic clouds (Pithoprakta, 1956). Golden ratio frequency relationships for maximal non-periodicity.*                                                                                              |
| 4  | **Euclidean**          | Distributes N pulses as evenly as possible across M steps using the Bjorklund algorithm. Produces maximally-even rhythmic patterns found across world music traditions.                                                                                                                                                                                                                                                             | *Bjorklund (2003), Toussaint, "The Euclidean Algorithm Generates Traditional Musical Rhythms" (2005). Connects Euclid's GCD algorithm to West African bell patterns, Afro-Cuban clave, and Balkan aksak meters.* |
| 5  | **Harmonic**           | Maintains multiple pulse streams at overtone-series ratios (1:2:3:...N). Each harmonic h has period fundamental/h. Events fire when any harmonic pulses, creating rhythms derived from the physics of vibrating bodies.                                                                                                                                                                                                             | *Hindemith, The Craft of Musical Composition (1937). Harmonic series as rhythmic generator — temporal analogue of spectral structure.*                                                                           |
| 6  | **Multigenerator**     | Three or more concurrent periodic generators (3-Generator, Fibonacci, Series II, Series III) whose combined attacks form composite rhythms more intricate than any two-generator polyrhythm.                                                                                                                                                                                                                                        | *Schillinger Ch 6, multi-generator resultants. Extension of two-voice interference into higher-dimensional periodic structure.*                                                                                  |
| 7  | **Attack Groups**      | Time-rhythm × instrumental-rhythm product: a base meter is partitioned into attack/rest "places" producing dance-form templates (Polka, Fox-trot, Waltz, Rhumba) and free custom configurations.                                                                                                                                                                                                                                    | *Schillinger Ch 7, instrumental rhythm. The product of a time rhythm and an instrumental rhythm — choreographic time articulated through orchestral attack distributions.*                                       |
| 8  | **Lattice**            | Distributes duration groups across attack groups via PL (place-length) coordination. Three procedures: PL Distribution, Attack Sync, Full Coordination. Produces interlocking grids of pulse and rest.                                                                                                                                                                                                                              | *Schillinger Ch 8, coordination of time structures. Two-dimensional rhythmic grid where time and attack generators index into each other.*                                                                       |
| 9  | **Permutation**        | Cycles a small alphabet of durations, rests, or accents through every ordering (circular, retrograde, higher-order permutations). Produces predictable variation that exhausts a finite combinatorial space.                                                                                                                                                                                                                        | *Schillinger Ch 9–10, permutation of durations and rests. Combinatorial enumeration as compositional engine — Boulez's serial extension of the same idea.*                                                       |
| 10 | **Continuity**         | Subdivides a source rhythm by divisor, by bar, or by attack, producing homogeneous continuity from a sparse seed. The deeper the split, the more uniform the resulting flow.                                                                                                                                                                                                                                                        | *Schillinger Ch 11, homogeneous rhythmic continuity. Subdivision as a way of converting articulated material into continuous textural flow.*                                                                     |
| 11 | **Power Series**       | Group sizes follow mathematical progressions — squares (1,4,9,16), powers (1,2,4,8,16), triangular numbers (1,3,6,10), or binomial/trinomial squares. Creates accelerating or decelerating rhythmic arcs.                                                                                                                                                                                                                           | *Schillinger Ch 12, distributive powers. Mathematical series as compositional determinant of grouping size.*                                                                                                     |
| 12 | **Growth Series**      | Each duration is the sum of the two previous, following a Fibonacci-like growth pattern with selectable seed pair (Fibonacci, Series II, Series III, Interference Groups, Swing Hybrid).                                                                                                                                                                                                                                            | *Schillinger Ch 13, rhythm families. Fibonacci sequence, Bartók's proportional structures, Lendvai's analysis of golden section in musical form.*                                                                |
| 13 | **Acceleration**       | Inter-onset intervals change continuously over a cycle using one of seven curves: Harmonic (1, 1/2, 1/3...), Arithmetic, Geometric, Power, Summation, Primes, Rubato. Configurable accelerate/decelerate/bounce direction.                                                                                                                                                                                                          | *Schillinger Ch 14, variable velocities. Continuous transformation of pulse rate as compositional gesture.*                                                                                                      |
| 14 | **L-System**           | Lindenmayer system string rewriting generates fractal rhythmic sequences. Axiom 'A' with rules A→AB, B→A produces Fibonacci-word rhythms. 'A' maps to a long duration, 'B' to a short duration (golden ratio by default).                                                                                                                                                                                                           | *Lindenmayer (1968), biological growth models. Prusinkiewicz, The Algorithmic Beauty of Plants. Self-similar structures applied to musical time.*                                                                |
| 15 | **Beat Grid**          | A 16-step binary seed pattern (drum machine style) is expanded by a first-order Markov chain each bar. Low density stays close to the seed; high density produces wilder variations. Combines grid-based familiarity with stochastic evolution.                                                                                                                                                                                     | *Markov chains applied to pattern variation. Step sequencer tradition meets probabilistic generation.*                                                                                                           |
| 16 | **NOMN Drum Computer** | A 4-axis pad (Swing / Kick Push / Snare / Hi-hat) navigates a stylist-space learned from an open source corpus of drum patterns. The pad position blends the top-3 nearest cluster centroids via inverse-distance weighting; per-instrument probability matrices then sample the active 16-step grid each bar. Five voicing sliders (Hi-hat Boost, Cymbal Wash, Dynamics, Backbeat Accent, Wander) shape the output after blending. | *Genre-seeded probabilistic groove generation. The pad selects a momentary groove signature in latent style space; the engine emits the corresponding pattern across the active layers.*                         |
| 17 | **Subdivision Grid**   | Strictly metronomic emitter for arp-style workflows. Two parameters: Subdivision (1/4 down to 1/128, → 1..32 attacks per beat) and Tuplet (Straight, 3:2, 5:4, 7:4, 9:8, 11:8) multiplier. The grid itself contains no holes — perforation patterns it.                                                                                                                                                                             | *Classical step-sequencer / arpeggiator architecture exposed as a first-class rhythm engine for use under the Monophonic layer mode or as a base for perforation-driven texture.*                                |

## Parameters

| Parameter      | ID             | Range                                   | Default | Description                                              |
| -------------- | -------------- | --------------------------------------- | ------- | -------------------------------------------------------- |
| Density Min    | `densityMin`   | 0.01–60.0                               | 2.0     | Minimum attacks per beat                                 |
| Density Max    | `densityMax`   | 0.01–60.0                               | 8.0     | Maximum attacks per beat                                 |
| Density Shape  | `densityShape` | Flat / Arch / Rising / Falling / Random | Flat    | How density breathes between min and max across a phrase |
| Rhythm Pattern | `rhythmType`   | 0–17                                    | 0       | Algorithm selection (18 engines)                         |

### Engine-Specific Parameters

Each engine exposes its own sub-parameters under `Density > <Engine Name> - …` in the DAW automation list. Examples:

| Engine             | Key Parameters                                                                                                                                   |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Polyrhythm         | `resultantMode`, `ratioA`, `ratioB`, `resultantPhasing`, `resultantSyncDetect`                                                                   |
| Grouping           | `groupingMode`, `groupPattern`                                                                                                                   |
| Euclidean          | `euclideanPulses`, `euclideanSteps`                                                                                                              |
| Harmonic           | `maxHarmonic`                                                                                                                                    |
| Multigenerator     | `multiGenMode`, `genA`, `genB`, `genC`                                                                                                           |
| Attack Groups      | `instrumentalMode`, `placesAttack`, `placesRest`                                                                                                 |
| Lattice            | `coordProcedure`, `coordTimeGen`, `coordAttackGen`                                                                                               |
| Permutation        | `permutationMode`, `permElements`, `permVariation`, `permHigherOrder`                                                                            |
| Continuity         | `continuityMode`, `continuityDepth`                                                                                                              |
| Power Series       | `progression`, `powerGroupBase`, `powerGroupTermB`, `powerGroupTermC`                                                                            |
| Growth Series      | `growthSeriesType`                                                                                                                               |
| Acceleration       | `accelerationMode`, `accelRate`, `accelCycleLen`, `accelDirection`                                                                               |
| L-System           | `lsystemIterations`, `lsystemRatio`                                                                                                              |
| Beat Grid          | `beatGridPattern`, `genreGrooveIndex`                                                                                                            |
| NOMN Drum Computer | `styleSwing`, `styleKickPush`, `styleSnare`, `styleHihat`, `styleHihatBoost`, `styleCymbalWash`, `styleDynamics`, `styleBackbeat`, `styleWander` |
| Subdivision Grid   | `subdivisionRate`, `tupletRatio`                                                                                                                 |

<Note>
  Density values represent attacks per beat at 120 BPM. At other tempos, RESERVOIR maintains the same number of attacks per beat (not per second), keeping rhythmic density consistent regardless of tempo.
</Note>
