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

# Bird

# Bird Notation

Bird is a musical notation designed for composition of modern electronic music. Think of it as Markdown for music.

## File Structure

A `.bird` file has these sections, in order:

1. **Signature** — set BPM, key, and scale
2. **Global track definitions** — declare tracks with their instruments, effects, and channel strips
3. **Motif definitions** (optional) — reusable MIDI pattern fragments
4. **Arrangement** — define the section order and bar counts
5. **Section definitions** — write the musical content for each section

```bird theme={null}
# 1. Signature
sig
  bpm 128
  scale A aeolian

# 2. Global track definitions
tracks
  1 kick
    plugin kick
    strip console1

  2 bass
    plugin mini
    fx delay

  3 lead
    plugin jup8

# 3. Arrangement
arr
  intro 4
  verse 8
  chorus 8

# 4. Section definitions
sec intro
  trk 1 kick
    p x _ x _ x _ x _
    v 100 - 80 - 90 - 85 -
    n C1

sec verse
  trk 2 bass
    p q q q q
    v 90 70 80 60
    n C2 - Eb2 G2
```

> \[!NOTE]
> The older `ch` and `channels` keywords are still accepted by the parser for backward compatibility, but new files should use `trk` and `tracks`.

***

## Motif Definitions

Motifs are reusable MIDI pattern fragments defined at the top level of a bird file. They appear between track definitions and the arrangement. A motif is a named `PatternGroup` — it supports the full pattern vocabulary (`p`/`v`/`n`/`t`/`sw`/MPE/voice layers).

```bird theme={null}
motif bass_lick 2
  p q q q q
  v 100 80 90 70
  n Eb2 Gb2 Ab2 Bb2

motif fill 1
  p xx xx xx xx
  v 80 60 70 50
  n C3 D3 Eb3 F3

motif chord_stab 1
  p x _ x _x _ x _
  v 80 . 70 60 . 90 .
  n C4
  .
  v 60
  n +3
  .
  v 40
  n +7
```

The header is `motif <name> <length_beats>`. The body uses the same 2-space indent as sections and tracks. All pattern features work inside motifs: bracket subdivisions, euclidean rhythms, dotted/triplet durations, voice layers, MPE, swing, groove.

### Motif Operations

When referencing a motif with `@name(ops)`, operations are applied left to right, comma-separated:

| Operation         | Syntax                     | Description                              |
| ----------------- | -------------------------- | ---------------------------------------- |
| `transpose`       | `transpose 7`              | Shift all pitches by N semitones         |
| `octave`          | `octave -1`                | Transpose by whole octaves               |
| `invert`          | `invert 60`                | Mirror pitches around pivot (default 60) |
| `rev` / `reverse` | `rev`                      | Reverse note order in time               |
| `stretch`         | `stretch 0.5`              | Scale durations by factor                |
| `rotate`          | `rotate 2`                 | Cyclic pitch rotation                    |
| `constrain`       | `constrain 0 2 4 5 7 9 11` | Snap to scale pitch classes              |
| `harmonize`       | `harmonize 3 7`            | Add parallel voices at intervals         |
| `shift_vel`       | `shift_vel -20`            | Shift all velocities                     |
| `scale_vel`       | `scale_vel 0.8`            | Multiply all velocities                  |
| `quantize`        | `quantize 0.25`            | Snap note starts to grid                 |
| `humanize`        | `humanize 0.05`            | Add timing/velocity jitter               |
| `swing`           | `swing 0.6 0.5`            | Apply swing (amount, grid)               |
| `legato`          | `legato`                   | Extend notes to next note start          |
| `staccato`        | `staccato 0.5`             | Shorten notes by factor                  |
| `phase`           | `phase 0.5`                | Time-rotate within length                |
| `degrade`         | `degrade 0.3`              | Randomly remove 30% of notes             |
| `thin`            | `thin 2`                   | Keep every Nth note                      |
| `truncate`        | `truncate 2`               | Cut to first N beats                     |
| `repeat`          | `repeat 2`                 | Repeat the pattern N times               |
| `offset`          | `offset 0.5`               | Shift all notes forward                  |

```bird theme={null}
# Chained transforms
p @bass_lick(rev, transpose 7, stretch 0.5)

# Motif with multiple operations
p @fill(degrade 0.3, humanize 0.02)
```

***

## Tokens Reference

### Structure

| Token    | Purpose                                        | Syntax                         | Example          |
| -------- | ---------------------------------------------- | ------------------------------ | ---------------- |
| `sig`    | Start signature block                          | `sig` then indented entries    | see above        |
| `tracks` | Start tracks block                             | `tracks` then indented entries | see above        |
| `trk`    | Define a track (in sections)                   | `trk <number> <name>`          | `trk 1 kick`     |
| `plugin` | Assign instrument plugin                       | `plugin <keyword>`             | `plugin mini`    |
| `fx`     | Assign insert effect                           | `fx <keyword>`                 | `fx delay`       |
| `strip`  | Assign channel strip                           | `strip <keyword>`              | `strip console1` |
| `type`   | Set track type                                 | `type midi` or `type audio`    | `type audio`     |
| `arr`    | Start arrangement block                        | `arr` then indented entries    | see below        |
| `sec`    | Start section definition                       | `sec <name>`                   | `sec verse`      |
| `b`      | Set global bar count                           | `b <bars>`                     | `b 4`            |
| `key`    | Set key signature                              | `key <root> [mode]`            | `key Eb min`     |
| `cont`   | Continue pattern phase across section boundary | `cont`                         | `cont`           |

### Arrangement

The `arr` block lists sections with their bar lengths, indented:

```bird theme={null}
arr
  intro 4
  verse 8
  chorus 8
  verse 8
  chorus 8
  outro 4
```

### Key Signature

Sets the musical key for the project. Supports all 12 roots with sharps/flats, major and minor:

```bird theme={null}
key C            # C major
key Eb min       # Eb minor
key F# minor     # F# minor
key Bb           # Bb major
```

***

## Pattern (`p`)

Defines the rhythmic grid. Each token is one note slot. Positive = note-on, `_` = rest.

### Duration Tokens

| Token | Duration                  | Ticks |
| ----- | ------------------------- | ----- |
| `ww`  | Double whole note         | 768   |
| `w`   | Whole note (1 bar in 4/4) | 384   |
| `qq`  | Half note                 | 192   |
| `q`   | Quarter note (1 beat)     | 96    |
| `xx`  | Eighth note               | 48    |
| `x`   | Sixteenth note            | 24    |
| `s`   | Thirty-second note        | 12    |
| `ss`  | Sixty-fourth note         | 6     |

**Dotted** (1.5× duration) — append `.` or `d`:

| Token | Alias | Duration             | Ticks |
| ----- | ----- | -------------------- | ----- |
| `w.`  | `wd`  | Dotted whole         | 576   |
| `q.`  | `qd`  | Dotted quarter       | 144   |
| `xx.` | `xxd` | Dotted eighth        | 72    |
| `x.`  | `xd`  | Dotted sixteenth     | 36    |
| `s.`  | `sd`  | Dotted thirty-second | 18    |

Double dotted: `q..` = 1.75 beats (qdd).

**Triplet** (⅔× duration) — append `,` or `t`:

| Token | Alias | Duration              | Ticks |
| ----- | ----- | --------------------- | ----- |
| `w,`  | `wt`  | Whole triplet         | 256   |
| `q,`  | `qt`  | Quarter triplet       | 64    |
| `xx,` | `xxt` | Eighth triplet        | 32    |
| `x,`  | `xt`  | Sixteenth triplet     | 16    |
| `s,`  | `st`  | Thirty-second triplet | 8     |

### Rests

* `.` or `_` — rest of the same length as the previous duration
* `_w`, `_q`, `_x`, `_xx`, `_s`, `_ss` etc. — explicit rest durations (same naming as above, prefixed with `_`)

> **Note:** `.` as a standalone token (space-separated) means rest. `.` immediately after a duration letter (no space) means dotted: `q.` = dotted quarter (1.5 beats), `q .` = quarter then rest.

### Duration Multiplier

Append a number to any duration token to multiply its length. Works for both note-ons and rests:

| Token | Meaning                      | Ticks |
| ----- | ---------------------------- | ----- |
| `w4`  | Whole note × 4 = 4 bars      | 1536  |
| `q2`  | Quarter note × 2 = half note | 192   |
| `_w8` | 8 bars of rest               | 3072  |
| `_q4` | 4 beats of rest              | 384   |
| `qd2` | Dotted quarter × 2           | 288   |

This is useful for held notes that span multiple bars, or for compactly expressing long rests:

```bird theme={null}
p w4 _w8              # 4-bar held note, then 8 bars of silence
p q2 _q q _q q _q     # half note, then alternating quarter rests and quarter notes
```

### Timing Rule

All `p` lines in a section must sum to the same total bar length. A 4/4 bar = 384 ticks = 4 quarters = 8 eighths = 16 sixteenths. Mismatched lengths cause desync.

### Examples

```bird theme={null}
p q q q q          # 4 quarter notes = 1 bar
p x x x x x x x x x x x x x x x x   # 16 sixteenths = 1 bar
p qq . qq .        # half note, rest, half note, rest = 1 bar
p q . q q          # quarter, rest, quarter, quarter
p q. xx q q        # dotted quarter + eighth + two quarters = 1 bar
p q, q, q,         # three quarter-note triplets = 2 beats
```

### Ties

Combine durations with `~` (tilde) to express held notes that span standard note values — just like ties in sheet music:

```bird theme={null}
p w~q          # whole tied to quarter = 5 beats
p w~qq         # whole tied to half = 6 beats
p qq~q         # half tied to quarter = 3 beats
p w~w          # 2 bars tied
p w~q~xx       # whole + quarter + eighth = 5.5 beats
p _w~q         # 5-beat rest
```

Ties are more musical than multipliers for note-on durations. Both can coexist — ties for composition, multipliers for mechanical rests.

### Tuplets (Bracket Subdivision)

Divide any duration into N equal parts using bracket notation. Inside brackets, `-` (or `x`) marks a hit, `.` (or `_`) marks a rest:

```bird theme={null}
# 5 notes in a quarter note (quintuplet)
p q[- - . - -] q q q
  v [80 70 . 60 50] 100 80 80
  n C2 [D2 E2 . G2 A2] C2 C2

# 7 notes evenly spaced within 1 quarter note
p q q[- - - - - - -] q q
  v 100 [80 90 100 90 80 70 60] 100 80

# 5 notes in a half note (quintuplet)
p qq[- - - - -] qq
  v [100 90 80 70 60] 80

# Nested: quarter split into 3, middle part split into 4
p q[- [- - - -] -] q q q
  v [60 [50 40 30 20] 80] 100 80 80

# Rests inside brackets
p q[- - . - -] q q q     # hit, hit, rest, hit, hit
p q[- . - . -] q q q     # alternating hit/rest
```

Brackets on `v`, `n`, and `t` lines are **visual grouping only** — the parser strips them. They keep tuplet values visually aligned with the `p` line.

### Euclidean Rhythms

Distribute K hits evenly across N slots using the Bjorklund algorithm. Syntax: `duration(k,n)` or `duration(k,n,r)` where `r` is an optional rotation offset:

```bird theme={null}
p q(3,8)               # quarter note: 3 hits in 8 slots (Bjorklund)
p w(5,16)              # whole bar: 5 hits in 16 slots
p w(3,8,1)             # with rotation: shift pattern 1 position right
p q q(3,8) q q         # mix euclidean with regular durations
```

The duration token sets the total time span. Each slot gets `duration / n` beats. Hits and rests are distributed as evenly as possible by the Bjorklund algorithm.

### Motif References

Reference a named motif as a pattern token. The motif occupies its `length_beats` on the timeline and brings its own notes, velocities, and timing:

```bird theme={null}
# Simple stamp
p @verse_bass @verse_bass(transpose 5)

# Mixed with regular pattern
p q q @fill(rev) q
  v 100 80 90 70         # values cycle through non-motif slots only
  n Eb2 Gb2 Ab2 Bb2

# After rests
p w . @bass_lick w

# Chained transforms
p @bass(rev, transpose 7, stretch 0.5)
```

Optional `...` on `v`/`n` lines for visual alignment (no-op, purely cosmetic):

```bird theme={null}
p q @bass_lick q q
  v 80 ... 90 70
  n Eb2 ... Ab2 Bb2
```

***

## Velocity (`v`)

Sets the MIDI velocity (0–127) for each note slot. Cycles through values when the pattern repeats.

| Syntax      | Meaning                       | Example                           |
| ----------- | ----------------------------- | --------------------------------- |
| `80`        | Absolute velocity             | `v 80`                            |
| `.`         | Default velocity (80)         | `v . 100 . 100`                   |
| `-`         | Repeat previous velocity      | `v 100 - 60 -` → 100, 100, 60, 60 |
| `+N` / `-N` | Relative offset from previous | `v 80 +10 -20`                    |

Values are clamped to 0–127. The velocity list cycles independently of the pattern length. Omitting the `v` line entirely also yields velocity 80 — the same value `.` produces.

```bird theme={null}
v 100 60 80 40      # cycling 4 velocities
v 90 -               # alternating: 90, 90, 90, ...
v 80 +10 +10 -30    # 80, 90, 100, 70, 80, 90, ...
```

***

## Notes (`n`)

Specifies pitches for each pattern slot. Supports multiple formats that can be mixed.

### Formats

| Format             | Example      | Description                                       |
| ------------------ | ------------ | ------------------------------------------------- |
| MIDI number        | `n 60`       | Middle C                                          |
| Note name          | `n C4`       | Middle C (with octave)                            |
| Chord name         | `n @Cm7`     | C minor 7th chord (all notes play simultaneously) |
| Repeat             | `n 60 -`     | Repeat previous pitch                             |
| Relative offset    | `n 60 +7 +5` | Add/subtract semitones from previous              |
| Simultaneous notes | `n 60 64 67` | All on one line = chord (C major triad)           |

### Note Names

Standard note names with optional accidentals and octave:

```
C4  D4  E4  F4  G4  A4  B4     # naturals
C#4 D#4 F#4 G#4 A#4            # sharps
Db4 Eb4 Gb4 Ab4 Bb4            # flats
```

Octave 4 starts at MIDI 60 (Middle C). Omitting octave defaults to 4.

### Chord Names

Prefix with `@`. Optionally prefix octave before root letter.

| Chord           | Syntax                   | Notes       |
| --------------- | ------------------------ | ----------- |
| Major           | `@C`, `@Cmaj`, `@CM`     | C E G       |
| Minor           | `@Cm`, `@Cmin`, `@C-`    | C Eb G      |
| Dominant 7th    | `@C7`, `@Cdom7`          | C E G Bb    |
| Major 7th       | `@Cmaj7`, `@CM7`         | C E G B     |
| Minor 7th       | `@Cm7`, `@Cmin7`, `@C-7` | C Eb G Bb   |
| Diminished      | `@Cdim`, `@Co`           | C Eb Gb     |
| Diminished 7th  | `@Cdim7`, `@Co7`         | C Eb Gb A   |
| Half-diminished | `@Cm7b5`, `@Cø`          | C Eb Gb Bb  |
| Augmented       | `@Caug`, `@C+`           | C E G#      |
| Augmented 7th   | `@Caug7`, `@C+7`         | C E G# Bb   |
| Suspended 2nd   | `@Csus2`                 | C D G       |
| Suspended 4th   | `@Csus4`, `@Csus`        | C F G       |
| Dominant 9th    | `@C9`                    | C E G Bb D  |
| Minor 9th       | `@Cm9`, `@Cmin9`         | C Eb G Bb D |
| Major 9th       | `@Cmaj9`, `@CM9`         | C E G B D   |
| Power chord     | `@C5`, `@Cpower`         | C G         |

**Octave prefix**: `@3Cm7` = C minor 7th starting at octave 3.

### Simultaneous Notes (Chords)

Multiple plain notes on one `n` line play simultaneously as a chord:

```bird theme={null}
n 41 48 53 56       # MIDI numbers = chord
n E2 C3 F3 Ab3      # note names = chord
```

### Bracket Chords (Explicit Voicings)

Use `[note note note]` on an `n` line for per-step chord voicings. Each bracketed group counts as one note step that cycles with the pattern:

```bird theme={null}
p q q q q
  n [C4 Eb4 G4] [F4 Ab4 C5] C4 [G4 B4 D5]
  # step 1: C minor triad
  # step 2: F minor (1st inv)
  # step 3: single C4
  # step 4: G major

# Mix bracket chords with named chords
p w w
  n @Cm7 [F4 Ab4 C5 Eb5]
```

### Sequential Notes

When using `-`, `+N`, or `@chords`, each token is a separate step that cycles with the pattern:

```bird theme={null}
n C4 - Eb4 G4       # step 1: C4, step 2: C4, step 3: Eb4, step 4: G4
n 60 +7 +5 -12      # step 1: 60, step 2: 67, step 3: 72, step 4: 60
n @Cm7 @Fm7 @G7     # step 1: Cm7 chord, step 2: Fm7, step 3: G7
```

### Layering

Multiple velocity + note groups can share one pattern (multi-layer voicings):

```bird theme={null}
p w _ w _
  v 70 90 100
    n @Cm7 @Fm7 @G7
  v 60
    n +7 +7 +8        # second layer at different velocity
  v 30
    n +12              # third layer (higher octave, soft)
```

***

## Swing (`sw`)

Adds groove by shifting every other note later. Applied per channel per section.

```bird theme={null}
sw <percent> [~<humanize>]
```

| Value | Feel                             |
| ----- | -------------------------------- |
| `50`  | Perfectly straight (default)     |
| `55`  | Light swing                      |
| `60`  | Medium swing                     |
| `67`  | Triplet swing (classic MPC feel) |
| `75`  | Heavy swing                      |

The optional `~N` adds random ±N ticks of jitter to **all** notes for extra humanization.

```bird theme={null}
sw 60           # medium swing
sw 67 ~5        # triplet swing + ±5 tick humanize
sw 50 ~3        # straight timing + slight random jitter
```

***

## Per-Note Timing (`t`)

Fine-grained timing offsets per pattern slot. Values are in ticks (1 tick ≈ 1/96 of a beat). Cycles like velocity.

```bird theme={null}
t <start[/end]> <start[/end]> ...
```

* **Start offset** — shifts the note-on position:
  * Positive = late (behind the beat / laid back)
  * Negative = early (ahead of the beat / pushing)
  * `0` = on grid
* **End offset** (optional, after `/`) — adjusts the note-off (release) by N ticks:
  * Positive = longer held note
  * Negative = shorter (more staccato)
  * Defaults to `0` if omitted

```bird theme={null}
# Start offsets only (backward compatible)
t 0  +5 -3  0       # C4 on grid, Eb4 late, G4 early, Bb4 on grid

# Start and end offsets
t 0/0  +5/-3  -3/+10  0/0   # Eb4 starts late and releases early, G4 starts early and holds 10 ticks longer
```

One tick = 1/24 of a sixteenth note = 1/96 of a quarter note.

***

## CC Curves (`cc`)

Define MIDI continuous controller curves. Supports both multi-line (preferred) and single-line (legacy) formats.

### Multi-line format (preferred)

Uses the same position/value/shape sub-lines as `auto` blocks:

```bird theme={null}
cc <number>
  .  <bar:tick> <bar:tick> ...     # positions
  _  <value> <value> ...           # CC values (0–127)
  ~  <shape> <shape> ...           # curve shapes
```

```bird theme={null}
# Filter cutoff (CC 74): sweep up then step back down
cc 74
  .  0:0 2:0 4:0 6:0
  _  0 64 127 0
  ~  lin exp stp lin
```

### Single-line format (legacy, still supported)

```bird theme={null}
cc <number> <value> [shape duration] <value> ...
```

```bird theme={null}
cc 1 0 ramp q2 127 hold q ramp q 0
cc 74 20 ramp w4 127
```

## Pitch Bend (`pb`)

Same multi-line format as `cc` but without a controller number. Values range from -8191 to +8191.

```bird theme={null}
pb
  .  0:0 2:0
  _  0 8192
  ~  lin
```

Legacy single-line: `pb 0 ramp q2 8191 ramp q2 0`

## Aftertouch (`at`)

Channel aftertouch (key pressure). Same format as `pb`. Values 0–127.

```bird theme={null}
at
  .  0:0 2:0 4:0
  _  0 90 0
  ~  lin lin
```

Legacy single-line: `at 0 ramp q2 90 hold q ramp q 0`

***

## Automation (`auto`)

Define automation curves using breakpoints with positions, values, and interpolation shapes. Each block has a header line and up to three sub-lines:

```bird theme={null}
auto <param_name>
  .  <bar:tick> <bar:tick> ...     # positions (beat grid)
  _  <value> <value> ...           # values (normalized 0.0–1.0)
  ~  <shape> <shape> ...           # curve shape per segment
```

### Sub-Lines

| Prefix | Purpose                                                                 | Example          |
| ------ | ----------------------------------------------------------------------- | ---------------- |
| `.`    | **Positions** — beat locations in `bar:tick` format (96 ticks per beat) | `.  0:0 4:0 8:0` |
| `_`    | **Values** — parameter values at each position (0.0–1.0 normalized)     | `_  0.2 0.8 1.0` |
| `~`    | **Shapes** — interpolation curve from this point to the next            | `~  lin exp smt` |

### Shape Keywords

| Shape | Interpolation                         |
| ----- | ------------------------------------- |
| `lin` | Linear (straight line between points) |
| `exp` | Exponential (fast start, slow end)    |
| `log` | Logarithmic (slow start, fast end)    |
| `stp` | Step/hold (constant until next point) |
| `smt` | Smooth (cubic Hermite interpolation)  |

### Examples

```bird theme={null}
# Filter cutoff: sweep up over 4 bars with exponential curve
auto cutoff
  .  0:0 4:0 8:0 12:0
  _  0.2 0.8 0.3 1.0
  ~  lin exp stp smt

# Multiple automation blocks on one track
auto cutoff
  .  0:0 4:0
  _  0.2 0.8
  ~  lin exp
auto resonance
  .  0:0 8:0
  _  0.5 1.0
  ~  stp smt
```

Sub-lines are optional — you can provide just positions and values without shapes (defaults to linear), or just a header with no sub-lines.

### Automation Macro Names

Semantic macro names are mapped to real plugin parameter names automatically:

| Macro                   | Controls                    |
| ----------------------- | --------------------------- |
| `brightness` / `cutoff` | Filter cutoff frequency     |
| `resonance`             | Filter resonance            |
| `attack`                | Amp/filter attack time      |
| `decay`                 | Amp/filter decay time       |
| `release`               | Amp/filter release time     |
| `pitch`                 | Oscillator/sound pitch      |
| `drive`                 | Distortion/harmonics amount |
| `mix`                   | Wet/dry mix                 |
| `width`                 | Stereo width                |

***

## Plugin Keywords

### Instruments

| Keyword    | Plugin         | Type               |
| ---------- | -------------- | ------------------ |
| `synths`   | Pigments       | General synth      |
| `mini`     | Mini V3        | Analog mono synth  |
| `cs80`     | CS-80 V4       | Poly synth         |
| `prophet`  | Prophet-5 V    | Poly synth         |
| `jup8`     | Jup-8 V4       | Poly synth         |
| `dx7`      | DX7 V          | FM synth           |
| `buchla`   | Buchla Easel V | West coast         |
| `surge`    | Surge XT       | Open source synth  |
| `kick`     | Kick 3         | Kick drum synth    |
| `drums`    | Heartbeat      | Drum machine       |
| `bass`     | Mini V3        | Bass (uses Mini V) |
| `sublab`   | SubLabXL       | Sub bass           |
| `monoment` | Monoment Bass  | Bass synth         |

### Effects

| Keyword    | Plugin            |
| ---------- | ----------------- |
| `delay`    | Tube Delay        |
| `valhalla` | ValhallaRoom      |
| `widener`  | Softube Widener   |
| `soothe`   | soothe2           |
| `tube`     | Dist TUBE-CULTURE |

### Channel Strips

| Keyword    | Plugin    |
| ---------- | --------- |
| `console1` | Console 1 |

***

## Automation Macro Names

Semantic macro names are mapped to real plugin parameter names automatically. Use these in step or ramp automation.

### Synth Macros

| Macro                   | Controls                |
| ----------------------- | ----------------------- |
| `brightness` / `cutoff` | Filter cutoff frequency |
| `resonance`             | Filter resonance        |
| `attack`                | Amp/filter attack time  |
| `decay`                 | Amp/filter decay time   |
| `release`               | Amp/filter release time |

### Drum/Bass Macros

| Macro    | Controls                    |
| -------- | --------------------------- |
| `pitch`  | Oscillator/sound pitch      |
| `decay`  | Sound decay time            |
| `volume` | Output level                |
| `drive`  | Distortion/harmonics amount |

### Effect Macros

| Macro   | Controls                      |
| ------- | ----------------------------- |
| `mix`   | Wet/dry mix                   |
| `decay` | Reverb decay / delay feedback |
| `width` | Stereo width                  |

### Channel Strip Macros (Console 1)

| Macro         | Controls             |
| ------------- | -------------------- |
| `input_gain`  | Input gain           |
| `comp_thresh` | Compressor threshold |
| `comp_ratio`  | Compressor ratio     |
| `eq_mid_gain` | EQ mid band gain     |
| `low_cut`     | High-pass filter     |

***

## `cont` — Pattern Continuity

Use `cont` in a section to continue a channel's pattern phase from the previous section (rather than restarting from beat 1):

```bird theme={null}
sec verse
  trk 1 arp
    cont
    p x x x x x x x x
    v 80 60 70 50
    n C4 E4 G4 C5
```

Without `cont`, each section resets the pattern/note/velocity counters to 0. With `cont`, the counters pick up where the previous section left off, creating seamless transitions.

***

## Track Types

| Type    | Description                                                  |
| ------- | ------------------------------------------------------------ |
| `midi`  | MIDI track (default) — plays notes through instrument plugin |
| `audio` | Audio track — plays audio samples or Lyria-generated audio   |

```bird theme={null}
trk 4 pad
  type audio
```

***

## Complete Example

```bird theme={null}
sig
  bpm 120
  key Eb min

tracks
  1 kick
    plugin kick
    strip console1

  2 hihat
    plugin drums

  3 bass
    plugin mini
    fx delay

  4 chords
    plugin jup8
    strip console1

arr
  intro 4
  verse 8
  chorus 8

sec intro
  trk 1 kick
    p q _ q _
    v 100 - 80 -
    n C1

  trk 2 hihat
    sw 60
    p x x x x x x x x x x x x x x x x
    v 60 40 80 40 60 40 80 40 60 40 80 40 60 40 80 40
    n F#2

sec verse
  trk 1 kick
    p q _ q q
    v 110 - 90 100
    n C1

  trk 2 hihat
    sw 60 ~3
    p x x x x x x x x x x x x x x x x
    v 70 40 90 40 70 40 90 50 70 40 90 40 70 40 90 50
    n F#2
    t 0 +3 -2 0 +1 +4 -1 0 0 +2 -3 0 +1 +3 -2 0

  trk 3 bass
    p xx xx _ xx xx xx _ xx
    v 100 80 - 90 85 100 - 70
    n Eb2 - - Gb2 Ab2 Bb2 - Eb2
    brightness ramp 0.3 0.8

  trk 4 chords
    p w _ w _
    v 70
    n @Ebm7 - @Abm7 @Bb7

sec chorus
  trk 1 kick
    p q q q q
    v 120
    n C1

  trk 3 bass
    cont
    p xx xx xx xx xx xx _ xx
    v 110 90 100 80 110 90 - 70
    n Eb2 Gb2 Ab2 Bb2 Eb3 Bb2 - Gb2

  trk 4 chords
    p qq qq qq qq
    v 85 75 90 80
    n @Ebm7 @Abm7 @Bb7 @Gbmaj7
```

***

## Tick Reference

All timing in Bird is based on a 384-tick bar (96 ticks per beat in 4/4):

| Unit                | Ticks |
| ------------------- | ----- |
| Whole note (bar)    | 384   |
| Half note           | 192   |
| Quarter note (beat) | 96    |
| Eighth note         | 48    |
| Sixteenth note      | 24    |
| One `t` tick        | 1     |

The `sw` and `t` timing features operate in this tick space.
