> ## 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.

# Layers

> 12 layers with 5 inter-layer coordination modes

# Layer System

RESERVOIR generates up to **12 simultaneous layers** of MIDI. Each layer runs its own instance of the rhythm engine, perforation engine, and pitch pattern, but shares global parameter settings (density, scale, articulation, etc.).

Layers coordinate via a global **Layer Interaction** mode that determines how each layer's perforation and event stream responds to the activity of the others.

## Layer Count

| Parameter     | ID             | Range | Default | Description                        |
| ------------- | -------------- | ----- | ------- | ---------------------------------- |
| Active Layers | `activeLayers` | 1–12  | 8       | Number of active generating layers |

Each layer receives a unique **phase offset** (0.0–1.0), seeded deterministically from its position. This means Layer 1 and Layer 7 will always produce different rhythmic patterns from the same algorithm settings — the variation is structural, not random.

## Interaction Modes

The five modes are selected via the **Layer Interaction** parameter and apply globally across all active layers.

| Mode              | What It Does                                                                                                                                                                                                             | Lineage                                                                                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Independent**   | Each layer generates with no coordination. Maximum textural complexity and density — every layer follows its own logic without regard to others.                                                                         | *Free polytonality. Ives' layered independence (The Unanswered Question). Ligeti's micropolyphony — many independent voices creating emergent texture.*                        |
| **Inverse**       | Each layer's perforation pattern is the rhythmic inverse of its predecessor — where one rests, the next attacks. Layers become more active when other layers are quiet, producing call-and-response interlocking.        | *Antiphonal traditions. Renaissance double-choir writing. Reich's phasing inverse complements.*                                                                                |
| **Complementary** | Layers fill each other's gaps (hocket). When one layer rests, another plays. Creates interlocking patterns where the composite texture is denser than any individual part.                                               | *African hocket technique — melody distributed across multiple performers, each contributing fragments. Machaut's isorhythmic motets. Balinese kotekan interlocking patterns.* |
| **Synchronized**  | Holes align across layers. Gaps and attacks coincide, creating a unified rhythmic texture that breathes as one voice.                                                                                                    | *Messiaen's rhythmic unisons. Orchestral tutti — all instruments articulating together as a collective body.*                                                                  |
| **Monophonic**    | Single-voice priority across layers — new attacks cut off any still-sounding notes. Only the most recent layer event sustains at any given moment, producing a single sequential line distributed across the layer pool. | *Last-note-priority monosynth tradition. Bach's two-part inventions distributed across timbres.*                                                                               |

The interaction mode is set globally:

| Parameter         | ID          | Options                                                           | Default     |
| ----------------- | ----------- | ----------------------------------------------------------------- | ----------- |
| Layer Interaction | `coordMode` | Independent / Inverse / Complementary / Synchronized / Monophonic | Independent |

<Note>
  Complementary (hocket) is a productive starting point — it produces the most immediately musical results across most algorithm combinations. 8 layers in Complementary mode create a dense but clear texture where no two layers compete for the same rhythmic space.
</Note>
