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

# Notes

> Read and write MIDI notes in clips.

Read and write MIDI notes in clips.

## Command line

### `note list`

List notes in a clip

```bash theme={null}
vibrai note list <track> <scene>
```

<ParamField path="track" required>
  Track number (1-based: 1, 2, … or first, second, …)
</ParamField>

<ParamField path="scene" required>
  Scene number (1-based: 1, 2, … or first, second, …)
</ParamField>

### `note set`

Replace all notes in a clip

```bash theme={null}
vibrai note set <track> <scene> --json-data <JSON> --file <PATH>
```

<ParamField path="track" required>
  Track number (1-based: 1, 2, … or first, second, …)
</ParamField>

<ParamField path="scene" required>
  Scene number (1-based: 1, 2, … or first, second, …)
</ParamField>

<ParamField path="--json-data">
  Notes as JSON array
</ParamField>

<ParamField path="--file">
  Path to JSON file containing notes array
</ParamField>

### `note add`

Add notes to a clip

```bash theme={null}
vibrai note add <track> <scene> --json-data <JSON> --file <PATH>
```

<ParamField path="track" required>
  Track number (1-based: 1, 2, … or first, second, …)
</ParamField>

<ParamField path="scene" required>
  Scene number (1-based: 1, 2, … or first, second, …)
</ParamField>

<ParamField path="--json-data">
  Notes as JSON array
</ParamField>

<ParamField path="--file">
  Path to JSON file containing notes array
</ParamField>

### `note remap`

Move every note at one pitch to another, server-side (session/arrangement/both)

```bash theme={null}
vibrai note remap <track> --from <PITCH> --to <PITCH> --scope <SCOPE> --scene <N>
```

<ParamField path="track" required>
  Track number (1-based: 1, 2, … or first, second, …)
</ParamField>

<ParamField path="--from">
  Source MIDI pitch 0-127 (only notes at this pitch move)
</ParamField>

<ParamField path="--to">
  Target MIDI pitch 0-127
</ParamField>

<ParamField path="--scope">
  session, arrangement, or both (default both)
</ParamField>

<ParamField path="--scene">
  Scene number (1-based) to limit to one session clip; requires --scope session
</ParamField>

## MCP tools

### `list_notes`

List all notes in a clip.

```json theme={null}
{
  "tool": "list_notes",
  "arguments": {
    "track_id": "<String>",
    "scene_index": "<String>"
  }
}
```

<ParamField path="track_id" type="String" required>
  Track number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

<ParamField path="scene_index" type="String" required>
  Scene number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

### `write_notes`

Replace all notes in a clip with the given list.

```json theme={null}
{
  "tool": "write_notes",
  "arguments": {
    "track_id": "<String>",
    "scene_index": "<String>",
    "notes": "<NoteEvent[]>"
  }
}
```

<ParamField path="track_id" type="String" required>
  Track number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

<ParamField path="scene_index" type="String" required>
  Scene number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

<ParamField path="notes" type="NoteEvent[]" required>
  Notes to write (replaces all existing).
</ParamField>

### `add_notes`

Append notes to a clip without removing existing notes.

```json theme={null}
{
  "tool": "add_notes",
  "arguments": {
    "track_id": "<String>",
    "scene_index": "<String>",
    "notes": "<NoteEvent[]>"
  }
}
```

<ParamField path="track_id" type="String" required>
  Track number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

<ParamField path="scene_index" type="String" required>
  Scene number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

<ParamField path="notes" type="NoteEvent[]" required>
  Notes to append.
</ParamField>

### `remap_pitch`

Move every note at from\_pitch to to\_pitch on one track, server-side — no note round-tripping, all other note fields preserved. Scope 'session', 'arrangement', or 'both' (default both); scene\_index (session scope only) narrows to one clip. Reports clips\_touched/notes\_changed. The drum-pad retargeting primitive; see retarget\_drums for the automatic kit-swap flow.

```json theme={null}
{
  "tool": "remap_pitch",
  "arguments": {
    "track_id": "<String>",
    "from_pitch": "<Int32>",
    "to_pitch": "<Int32>",
    "scope": "<String>",
    "scene_index": "<String>"
  }
}
```

<ParamField path="track_id" type="String" required>
  Track number (1-based: 1, 2, … or 'first', 'second', …)
</ParamField>

<ParamField path="from_pitch" type="Int32" required>
  Source MIDI pitch 0-127 (only notes at this pitch move)
</ParamField>

<ParamField path="to_pitch" type="Int32" required>
  Target MIDI pitch 0-127
</ParamField>

<ParamField path="scope" type="String">
  'session', 'arrangement', or 'both' (default)
</ParamField>

<ParamField path="scene_index" type="String">
  Scene number (1-based) to limit to one session clip; requires scope='session'
</ParamField>
