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

# Phrasing

> Articulation, phrase length, micro-timing, note duration, and velocity

# Phrasing

The Phrasing card shapes *how* notes are played — articulation, phrase length, micro-timing feel, note duration range, and velocity (range plus optional shaping curve).

## Articulation Styles

| Style         | What It Does                                                                                                              | Duration Multiplier |
| ------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| **Sustained** | No articulation processing. Notes play at their full generated duration. Suitable for drones and sustained textures.      | 1.0                 |
| **Legato**    | Sustained, connected notes with slight duration reduction.                                                                | 0.80–0.95           |
| **Staccato**  | Short, detached notes. Punchy, rhythmic character with clear separation between events.                                   | 0.20–0.40           |
| **Accent**    | Slight duration boost on each note for emphasis.                                                                          | 1.00–1.15           |
| **Mixed**     | Progressive shortening through each phrase — begins near legato (0.85) and shortens toward staccato (0.35) by phrase end. | 0.85→0.35           |

## Velocity

| Parameter      | ID                    | Range                                        | Default | Description                                              |
| -------------- | --------------------- | -------------------------------------------- | ------- | -------------------------------------------------------- |
| Velocity Min   | `velocityMin`         | 1–127                                        | 60      | Minimum MIDI velocity                                    |
| Velocity Max   | `velocityMax`         | 1–127                                        | 100     | Maximum MIDI velocity                                    |
| Velocity Curve | `velocityCurveShape`  | Off / Swell / Ramp / Drive / Fade / Captured | Off     | Phrase-level dynamic envelope shape                      |
| Curve Amount   | `velocityCurveAmount` | 0.0–1.0                                      | 0.0     | Blend between random-within-range (0) and full curve (1) |

Velocity is distributed within `[velocityMin, velocityMax]`. With Curve set to `Off`, distribution is uniformly random within that range. Other curves apply a phrase-level shape:

* **Swell** — corpus-informed phrase-level natural swell
* **Ramp** — linear rise across the phrase
* **Drive** — sustained high-energy weighting
* **Fade** — linear fall across the phrase
* **Captured** — uses the velocity envelope from a [MIR Capture](/reservoir/features/capture) fingerprint

## CC Controllers

RESERVOIR streams continuous controller data organized into five groups, each with its own update rate and envelope shape:

### Dynamics Group (\~30 Hz)

| CC   | Controller | Range            |
| ---- | ---------- | ---------------- |
| CC11 | Expression | 70–115 (default) |
| CC2  | Breath     | 60–115 (default) |

Plus **Channel Aftertouch**, which follows the Dynamics envelope.

### Timbre Group (\~20 Hz)

| CC   | Controller                 | Range        |
| ---- | -------------------------- | ------------ |
| CC74 | Brightness (filter cutoff) | Configurable |
| CC71 | Resonance                  | Configurable |

### Vibrato Group

| CC         | Controller          | Description      |
| ---------- | ------------------- | ---------------- |
| Pitch Bend | Vibrato oscillation | Centered at 8192 |
| CC76       | Vibrato Rate        | Configurable     |
| CC77       | Vibrato Depth       | Configurable     |

### Articulation Group (note-on only)

| CC   | Controller   | Description       |
| ---- | ------------ | ----------------- |
| CC73 | Attack Time  | Set once per note |
| CC72 | Release Time | Set once per note |

### Effects Group (\~15 Hz)

| CC   | Controller | Range        |
| ---- | ---------- | ------------ |
| CC1  | Modulation | Configurable |
| CC21 | Flutter    | Configurable |

All CC streams use breakpoint envelope shapes modulated by phrase position. The envelopes incorporate organic variation — slow wander, overlapping LFOs at incommensurate rates — for musically natural CC curves rather than mechanical automation.

## Micro-Timing

| Parameter | ID                 | Options                                    | Default | Description         |
| --------- | ------------------ | ------------------------------------------ | ------- | ------------------- |
| Feel      | `microTimingStyle` | Strict / NOMN / User Groove / Genre Groove | Strict  | Timing humanization |

* **Strict** — Events fire exactly at their computed PPQ positions.
* **NOMN** — Subtle micro-timing variation modulated by phrase position and event density. Contextual humanization rather than random jitter.
* **User Groove** — Per-grid-position timing deviations captured from your MIDI performance via [MIR Capture](/reservoir/features/capture). Each note is offset by the deviation learned at its sub-beat position, plus stochastic jitter scaled by the position's variance. Swing ratio from the capture is applied.
* **Genre Groove** — Per-genre micro-timing profiles extracted from drum-corpus analysis. Selects a groove template by genre index rather than from a captured performance.

## Phrase Structure

Articulation and expression operate within a **phrase structure** system. The default phrase pattern is 4-6-8-5-7 notes (selectable via `phraseLengthPreset`; alternates include 4-4-4-4, 8-8-8-8, 16-16-16-16, 2-3-5-8, Fibonacci 5-5-8-8-13, Corpus, and Custom). At each phrase boundary:

* A **breath** is optionally inserted (default 0.15 seconds of silence)
* Articulation resets (for Mixed mode)
* CC envelopes reset their phrase-position modulation

## Additional Phrasing Parameters

| Parameter       | ID                   | Range                                          | Default   | Description                                           |
| --------------- | -------------------- | ---------------------------------------------- | --------- | ----------------------------------------------------- |
| Articulation    | `articulationStyle`  | Sustained / Legato / Staccato / Accent / Mixed | Sustained | Articulation style                                    |
| Phrase Length   | `phraseLengthPreset` | 14 presets + Custom                            | 4-6-8-5-7 | Phrase length sequence                                |
| Note Length Min | `durationMin`        | 0.01–32.0                                      | 0.4       | Min note duration as fraction of inter-onset interval |
| Note Length Max | `durationMax`        | 0.01–32.0                                      | 0.9       | Max note duration as fraction of inter-onset interval |
