# Tracks, effects and automation

SDK 1.53.0. Generated from the SDK source and its original JSDoc. See the [API index](/docs/sdk-index) for version and source provenance, or the [SDK guide](/docs/sdk) for a first composition.

## `Point`

`[beat, value]` control point for `automation`.

```ts
export type Point = readonly [beat: number, value: number];
```

## `AutomationInput`

Automation lanes in beats. Each lane replaces the stored lane entirely.

```ts
export type AutomationInput = Readonly<{
  /** 0..1 */
  volume?: readonly Point[];
  /** -1..1 */
  pan?: readonly Point[];
  /** Filter cutoff in Hz, 20..20000 (needs `filter`). */
  filter?: readonly Point[];
  /** 0..1 (needs `filter`). */
  resonance?: readonly Point[];
  /** 0..0.9 (needs `delay`). */
  delayFeedback?: readonly Point[];
  /** 0..1 (needs `delay`). */
  delayMix?: readonly Point[];
  /**
   * Effect parameter lanes keyed `<effect>-<param>`, e.g.
   * `"autofilter-cutoff"`, `"distort-drive"`, `"reverb-mix"` (needs the effect).
   */
  fx?: Readonly<Record<string, readonly Point[]>>;
  /** Wavetable position 0..1 (needs `wavetable()`). */
  wt?: readonly Point[];
}>;
```

## `RIG_PRESETS`

Every rig preset (SDK 1.22.0), kept equal to `RIG_PRESETS` in
core/fx.ts by `print-rig.test.ts`: the stomp, head and cab stages plus
the companion effects a few rigs need (funk's and wah's autofilter,
bachata's chorus, jangle's compressor). `spring`'s short room is the
track's `reverb`, not `fx`: give it as
`reverb: { mix: 0.3, size: 0.35, fade: 1.5, predelay: 0, dim: 3500 }`.

```ts
export declare const RIG_PRESETS: Readonly<
  Record<
    string,
    Readonly<
      Record<"stomp" | "head" | "cab", EffectParams | undefined> &
        Readonly<Record<string, EffectParams | undefined>>
    >
  >
>;
```

## `rigReverb`

A rig preset's track reverb (`spring`, the shoegaze rigs), if any.

```ts
export declare function rigReverb(name: string): ReverbInput | undefined;
```

## `rig`

A guitar rig for a track's `fx` (SDK 1.22.0): the stomp → head → cab
stages of rig preset `name` and its companion effects (as the `rig`
command sets them), with optional per-stage overrides. Spread it
into `fx` next to other effects:

```ts
fx: { ...rig("crunch"), chorus: {} }
fx: { ...rig("metal", { head: { gain: 9 } }) }
```

```ts
export declare function rig(
  name: string,
  overrides?: Readonly<Partial<Record<"stomp" | "head" | "cab", EffectParams>>>,
): FxInput;
```

## `EffectParams`

One effect's parameters; omitted ones take DAWN's defaults.

```ts
export type EffectParams = Readonly<Record<string, number | string | boolean>>;
```

## `FxInput`

Insert effects by name, rendered in the fixed chain order
filter → djf → autofilter → vowel → crush → distort → stomp → head →
cab → tremolo → gate → compressor → pan → phaser → chorus → leslie → postgain →
delay → reverb. The guitar rig (stomp, head, cab; SDK 1.22.0) is easiest
as `...rig("crunch")`.
Keys here: djf, autofilter, vowel, crush, distort, stomp, head, cab,
tremolo, gate (a tempo-synced step gate: `{ pattern: "trance", length: 0.6 }`),
compressor, phaser, chorus, leslie, postgain, plus the mix-bus keys `orbit`
(`{ orbit: 2 }`, SDK 1.9.0) and `duck` (`{ orbit: 2, depth: 0.85 }`:
this track's onsets duck every other track on that orbit). See
docs/project-format.md for every parameter, its range and its Strudel name.

```ts
export type FxInput = Readonly<Record<string, EffectParams>>;
```

## `TrackFxInput`

A track's `fx`: effects by name, plus effect patches under `patch`.

```ts
export type TrackFxInput = Readonly<{
  patch?: readonly PatchSpec[];
  [effect: string]: EffectParams | readonly PatchSpec[] | undefined;
}>;
/**
 * Synth voice parameters by Strudel name; only the ones given are stored
 * and the rest take DAWN's defaults. Lanes go under `automation.fx` as
 * `"synth-<param>"` (e.g. `"synth-lpf"`), read at each note's onset; filter
 * cutoff and resonance lanes (`lpf`/`hpf`/`bpf`, `lpq`/`hpq`/`bpq`) keep
 * moving through a held note, so a sustained chord sweeps.
 * Every parameter, range and default: **Synth** in DAWN.md.
 */
```

## `KeysInput`

Modelled keys settings (SDK 1.24.0), for a track whose instrument is a
piano family (`"grand"`, `"upright"`, `"felt"`, `"honkytonk"`,
`"prepared"`; the words `"ballad"` and `"lofi"` pick presets) or, from
SDK 1.26.0, an electric family (`"epiano"`, `"wurli"`, `"clav"`; presets
epiano suitcase dyno wurli clav funkclav). Every field is optional; `{}`
is the family's own sound. Automate a parameter with
`automation.fx["keys-<param>"]` (hardness, touch, decay, release, knock,
noise, felt; electric tone, vibe, trem), read at each note's onset.
Ranges: **Keys** in DAWN.md.

```ts
export type KeysInput = Readonly<{
  /**
   * A named preset: grand ballad upright felt lofi honkytonk prepared, or
   * electric epiano suitcase dyno wurli clav funkclav.
   */
  preset?: string;
  /** Hammer hardness 0..1: brightness at a given velocity (0.5). */
  hardness?: number;
  /** Velocity sensitivity 0..1 (1). */
  touch?: number;
  /** Inharmonicity multiplier 0..4 (1 grand, 2.5 upright, 0 harmonic). */
  inharm?: number;
  /** Unison detune in cents 0..30 (0.7; honkytonk 16). */
  unison?: number;
  /** Sustain time multiplier 0.1..4 (1). */
  decay?: number;
  /** Damper time multiplier 0.1..4 (1). */
  release?: number;
  /** Hammer position along the string 0.04..0.3 (0.12). */
  strike?: number;
  /** Aftersound share 0..1 (0.3). */
  after?: number;
  /** Soundboard knock 0..1 (0.5). */
  knock?: number;
  /** Key and damper mechanics 0..1 (0.25). */
  noise?: number;
  /** Felt strip 0..1 (0; felt family 1). */
  felt?: number;
  /** Share of prepared keys 0..1 (0; prepared family 0.6). */
  prep?: number;
  /** Keyboard stereo width 0..1 (0.6). */
  width?: number;
  /** Octave stretch 0..1 (1); 0 keeps every key exactly on its tuning. */
  stretch?: number;
  /** Body EQ: grand upright felt honkytonk prepared (the family's own). */
  body?: string;
  /** Pitch wobble rate in Hz (tape wow), 0 off. */
  vib?: number;
  /** Pitch wobble depth in semitones (0.5). */
  vibmod?: number;
  /** Sympathetic string resonance 0..1 under the sustain pedal (0; pianos). */
  sym?: number;
  /** Pickup drive 0..1: growl when played hard (0.35; epiano, wurli). */
  bark?: number;
  /** Tine or reed bell ping 0..1 (0.5; epiano, wurli). */
  bell?: number;
  /** Output low-pass in Hz, 0 off (electric keys). */
  tone?: number;
  /** Clav pickup switch: neck bridge both out ("both"). */
  pickup?: "neck" | "bridge" | "both" | "out";
  /** Clav mute slider 0..1 (0). */
  mute?: number;
  /** Suitcase stereo vibrato depth 0..1 (0; epiano). */
  vibe?: number;
  /** Suitcase vibrato rate in Hz 0.5..12 (4; epiano). */
  vibehz?: number;
  /** Tonewheel drawbars, nine digits 0-8, 16' to 1' (`"888000000"`). */
  drawbars?: string;
  /** Tonewheel percussion: off 2nd 3rd. */
  perc?: string;
  /** Percussion decay: fast slow. */
  percdecay?: string;
  /** Key click 0..1. */
  click?: number;
  /** Scanner vibrato/chorus: off v1 v2 v3 c1 c2 c3. */
  scanner?: string;
  /** Preamp drive 0..1 (lane `keys-drive`). */
  drive?: number;
  /** Rotary speaker: slow fast stop (lane `keys-rotary`). */
  rotary?: string;
  /** Combo registers, five digits 0-8, 16' 8' 4' 2⅔' 2' (`"08800"`). */
  registers?: string;
  /**
   * Pipe stops: names or a registration (plenum flutes cornet reeds strings
   * full), as one string or a list (`["principal8", "octave4"]`).
   */
  stops?: string | readonly string[];
  /** Pipe chiff 0..1. */
  chiff?: number;
  /** Pipe wind unsteadiness 0..1. */
  wind?: number;
  /** Tremolo depth 0..1: reed piano (0; wurli), pipe tremulant (0; pipe). */
  trem?: number;
}>;
```

## `SynthInput`

```ts
export type SynthInput = Readonly<{
  attack?: number;
  decay?: number;
  sustain?: number;
  release?: number;
  gain?: number;
  /** Pink noise mixed into the oscillator, 0..1. */
  noise?: number;
  /** Crackle impulse density. */
  density?: number;
  /** Unison voices (supersaw defaults to 5). */
  unison?: number;
  /** Unison detune spread in semitones. */
  detune?: number;
  /** Stereo spread of the unison voices, 0..1. */
  spread?: number;
  /** Pulse width 0..1 (`pulse`). */
  pw?: number;
  pwrate?: number;
  pwsweep?: number;
  /** Vibrato rate (Hz) and depth (semitones). */
  vib?: number;
  vibmod?: number;
  /** Pitch envelope depth (semitones) and shape. */
  penv?: number;
  pattack?: number;
  pdecay?: number;
  psustain?: number;
  prelease?: number;
  pcurve?: number;
  panchor?: number;
  lpf?: number;
  lpq?: number;
  lpenv?: number;
  hpf?: number;
  hpq?: number;
  hpenv?: number;
  bpf?: number;
  bpq?: number;
  bpenv?: number;
  /** `12db`, `24db` or `ladder`. */
  ftype?: string;
  /** FM index and harmonicity ratio; `fm2`…`fm8` add operators. */
  fm?: number;
  fmh?: number;
  fmattack?: number;
  fmdecay?: number;
  fmsustain?: number;
  fmrelease?: number;
  /** `lin` or `exp`. */
  fmenv?: string;
  /** `sine`, `sawtooth`, `square` or `triangle`. */
  fmwave?: string;
  /** Harmonic amplitudes for `user` (or any basic waveform). */
  partials?: readonly number[];
  phases?: readonly number[];
  /** ZzFX controls for `z_*` sounds (units: DAWN.md "Synth"). */
  zrand?: number;
  curve?: number;
  slide?: number;
  deltaSlide?: number;
  pitchJump?: number;
  pitchJumpTime?: number;
  lfo?: number;
  zmod?: number;
  zcrush?: number;
  zdelay?: number;
  tremolo?: number;
  /** Any other Strudel synth parameter, e.g. `lpattack`, `fmh3`. */
  [param: string]: number | string | boolean | readonly number[] | undefined;
}>;
```

## `TrackInput`

Input to `track()`. Omitted fields keep DAWN's defaults.

```ts
export type TrackInput = Readonly<{
  /** Stable id DAWN assigned; defaults to the slug of `name`. Keep it when editing. */
  id?: string;
  /** Shown in the header; its slug names `tracks/<slug>/`. */
  name: string;
  /**
   * Synth voice (`sine`, `piano`, `pluck`, `bass`, `saw`, `square`,
   * `triangle`, and Strudel's `sawtooth`, `supersaw`, `pulse`, `user`,
   * `white`, `pink`, `brown`, `crackle`, and the ZzFX sounds `z_sine`,
   * `z_triangle`, `z_sawtooth`, `z_square`, `z_tan`, `z_noise`), `kit` for drums,
   * `sampler(...)` or `wavetable(...)`, or a mallet or bell (`vibes`,
   * `glock`, `gong`, … or `modal(...)`, SDK 1.25.0), or a texture bed
   * (`texture(...)` or `"texture"`, SDK 1.45.0). Default `sine`.
   */
  instrument?:
    | string
    | SamplerSpec
    | WavetableSpec
    | StringSpec
    | GranularSpec
    | ModalSpec
    | WindSpec
    | SingSpec
    | VocoderSpec
    | TextureSpec
    | PatchSpec
    | PatchRefSpec;
  /**
   * A vocoder on this track (SDK 1.32.0): `vocoder({ src: "vox" })` lets
   * the vox track's voice shape this track's sound; `null` removes it.
   */
  vocoder?: VocoderSpec | null;
  /**
   * The sampler a `granular(...)` track keeps while it grains one of its
   * voices (SDK 1.23.0); `grain off` plays it again.
   */
  sampler?: SamplerSpec | null;
  /**
   * The `wavetable(...)` a track keeps after it left the wavetable
   * instrument (SDK 1.32.0), so switching back restores it. A wavetable
   * track takes its table from `instrument` instead.
   */
  wavetable?: WavetableSpec | null;
  /**
   * Granular engine (SDK 1.23.0) for an `instrument: "granular"` track, or
   * use `instrument: granular("cloud", {...})` or a word (`"cloud"`).
   */
  granular?: GranularInput | null;
  /**
   * Synthesized drum kit for an `instrument: "kit"` track: `syn808`,
   * `syn909`, `acoustic`, `lofi`, `electro` or `trap`. Omit for the default
   * voices.
   */
  kit?: string;
  /**
   * The track's own clock against the song (SDK 1.14.0): `rate` 1.5 plays
   * three beats in two, `phase` starts it that many beats later, `cycle`
   * repeats its first `cycle` beats (a 3-beat cycle over 4/4 is polymeter).
   * `{ cycle: 3, rate: 13 / 12 }` drifts against a twin and realigns, the
   * tape phasing of Reich's Come Out; `phasing()` works the rate out for
   * you, and `stepPhasing()` gives Piano Phase's shift and hold.
   */
  time?: TrackTimeInput;
  /**
   * This track's tuning over the song's (SDK 1.16.0): a library name such
   * as `"pelog"` or `{ edo, ratios, cents, scl, kbm, ref, root, map }`.
   * `{ ref: 432 }` alone keeps the song's table at another pitch.
   */
  tuning?: TuningInput | null;
  /**
   * Wind engine settings as a field (SDK 1.32.0): a preset word or
   * `{ preset, ...params }`, the same as `instrument: wind(...)`. Use with
   * `instrument` omitted or `"wind"`.
   */
  wind?:
    | WindPresetName
    | Readonly<
        {
          preset?: WindPresetName;
        } & WindParams
      >
    | null;
  /**
   * Singing voice settings as a field (SDK 1.32.0), the same as
   * `instrument: sing(...)`. Use with `instrument` omitted or `"sing"`.
   */
  sing?:
    | SingPresetName
    | Readonly<
        {
          preset?: SingPresetName;
        } & SingParams
      >
    | null;
  /** Synth voice parameters, Strudel names (`{ attack: 0.01, lpf: 800 }`). */
  synth?: SynthInput;
  /**
   * String engine (SDK 1.21.0) for an `instrument: "string"` track, or use
   * `instrument: stringed("sitar", {...})` or a preset word (`"nylon"`).
   */
  string?: StringInput | null;
  /**
   * Modelled piano settings (SDK 1.24.0) for `instrument: "grand"` and the
   * other piano families; `{}` is the family's sound. The word `"piano"`
   * keeps the classic 0.4 tone; use `"grand"` for the modelled piano.
   */
  keys?: KeysInput;
  muted?: boolean;
  /** When any track is soloed only soloed tracks play. */
  solo?: boolean;
  /** 0..1, default 1. */
  volume?: number;
  /** -1 (left) .. 1 (right), default 0. */
  pan?: number;
  /** Filter (low-pass unless `type`); `null` or omitted means none. */
  filter?: FilterInput | null;
  /** Tempo-synced delay send in beats. */
  delay?: DelayInput | null;
  /** Stereo reverb send. */
  reverb?: ReverbInput | null;
  /**
   * Insert effects by name (`{ distort: { drive: 3 }, chorus: {} }`), and
   * effect patches under `patch` (SDK 1.35.0): `fx: { patch: [wideCrush] }`.
   */
  fx?: TrackFxInput;
  automation?: AutomationInput;
  /**
   * Signals that turn a patch's macros (SDK 1.35.0), by macro id:
   * `mods: { cutoff: sine.range(300, 2400).slow(4) }`. `song()` bakes each
   * into the macro's automation lane (`patch-<macro>`); a lane written
   * under `automation.fx` wins.
   */
  mods?: Readonly<Record<string, PatternSignal>>;
  /**
   * Signals that write automation lanes (SDK 1.35.0), by lane name as
   * `automation.fx` takes them: `lanes: { "synth-lpf": sine.range(400, 3000) }`.
   * `song()` bakes them into points; a lane written under `automation.fx` wins.
   */
  lanes?: Readonly<Record<string, PatternSignal>>;
  /**
   * Glide between notes (SDK 1.15.0): seconds (`glide: 0.08`, TB-303 style
   * legato) or `{ time, mode }`. Mode `legato` glides only into a note that
   * overlaps the previous one and does not retrigger it; `mono` always
   * glides and retriggers; `poly` glides every voice of a chord from the
   * matching voice of the previous one.
   */
  glide?:
    | number
    | Readonly<{
        time?: number;
        mode?: GlideMode;
      }>;
  /** Sustain pedal changes as `[beat, "down" | "half" | "up"]` (SDK 1.15.0). */
  pedal?: readonly (readonly [number, PedalState])[];
  /**
   * Una corda on a modelled piano (SDK 1.26.0): `[beat, "down" | "half" |
   * "up"]`; while down each note strikes fewer strings, softer and darker.
   */
  softPedal?: readonly (readonly [number, PedalState])[];
  /**
   * Sostenuto on a modelled piano (SDK 1.26.0): `[beat, "down" | "up"]`;
   * holds only the keys already down when it presses.
   */
  sostenuto?: readonly (readonly [number, "down" | "up"])[];
  /**
   * Audio clips on the timeline (SDK 1.32.0): `audio("samples/lead.wav",
   * { at: 8 })`, or `...repeatAudio(audio(...), { every: 8, until: 64 })`.
   * They sound on any instrument; on `vocal` the notes are silent guides.
   */
  clips?: readonly (AudioSpec | readonly AudioSpec[])[];
  /** Takes the clips play from (SDK 1.32.0): `take("take-1", "takes/take-1.wav", {...})`. */
  takes?: readonly TakeSpec[];
  /**
   * Velocity response (SDK 1.15.0): `soft` (quiet notes louder), `hard`
   * (needs a firm touch), `fixed` (every note at 0.8, like an organ) or
   * `{ curve: "fixed", fixed: 0.6 }`. Default `linear`.
   */
  velocityCurve?:
    | VelocityCurveName
    | Readonly<{
        curve: VelocityCurveName;
        fixed?: number;
      }>;
  /**
   * Seeded humanize applied when DAWN renders, so the notes stay as written
   * (SDK 1.15.0): `timing` ms either side, `velocity` and `length` in
   * percent, `seed` (default 1) picks another take.
   */
  humanize?: Readonly<{
    timing?: number;
    velocity?: number;
    length?: number;
    seed?: number;
  }>;
  /**
   * How chords are fretted on this track (SDK 1.27.0): `{ tune: "dadgad",
   * capo: 2 }`. DAWN's `strum` command and perform mode `guitar` use it;
   * it changes no sound by itself.
   */
  guitar?: GuitarInput;
  /**
   * Pitch correction on this track's clips and samples (SDK 1.32.0): a
   * preset word (`"hard"`), or `autotune("pop", { speed: 40 })`.
   */
  autotune?: AutotunePresetName | AutotuneSpec;
  /**
   * Machine vox (SDK 1.36.0): the engine and voice that sing this track's
   * lyrics, `{ engine: "formant", voice: "formant:robot" }` or
   * `vox("formant", "formant:robot")`.
   */
  vox?: VoxSpec | TrackVoxSpec | null;
  /** `note()`/`seq()` for pitched tracks, `hit()`/`hits()` for kits and one-shot samplers. */
  notes?: readonly (NoteSpec | HitSpec)[];
  /**
   * Generated voices, one row per voice: `euclid()`/`grid()`. DAWN expands
   * them into hits when the song loads; a row owns its voice, so `notes`
   * on the same voice are replaced.
   */
  rhythm?: readonly RhythmSpec[];
}>;
```

## `FilterInput`

```ts
export type FilterInput = Readonly<{
  cutoff: number;
  resonance?: number;
  /** `lpf` (default), `hpf` or `bpf`. */
  type?: "lpf" | "hpf" | "bpf";
  /** Slope: `12db` (default), `24db` or `ladder`. */
  ftype?: "12db" | "24db" | "ladder";
}>;
```

## `DelayInput`

```ts
export type DelayInput = Readonly<{
  beats: number;
  feedback?: number;
  mix?: number;
  /** Seconds; overrides `beats` when set (Strudel `delaytime`). */
  time?: number;
  /** Repeats alternate left/right. */
  pingpong?: boolean;
  /** Low-pass on the repeats, Hz. */
  highcut?: number;
}>;
```

## `ReverbInput`

```ts
export type ReverbInput = Readonly<{
  mix: number;
  size?: number;
  /** Decay to -60 dB in seconds (Strudel `roomfade`). */
  fade?: number;
  /** Low-pass on the input, Hz (Strudel `roomlp`). */
  lowpass?: number;
  /** Damping toward this Hz as the tail decays (Strudel `roomdim`). */
  dim?: number;
  /** Seconds before the tail. */
  predelay?: number;
  /** 0..1: match the tail's left and right energy (algorithmic tail only). */
  center?: number;
  /**
   * Convolution reverb (Strudel `iresponse`/`ir`): `"room"`, `"hall"`,
   * `"plate"` (generated), a pack sound `pack:<pack>/<sound>[:<n>]` or a
   * track-relative audio file. `size`, `fade` and `dim` then do nothing.
   */
  ir?:
    | string
    | Readonly<{
        src: string;
        sha256?: string;
        url?: string;
        license?: string;
      }>;
}>;
```

## `TrackTimeInput`

`track({ time })`: every field optional; absent follows the song.

```ts
export type TrackTimeInput = Readonly<{
  /** Tempo ratio against the song, 0.125..8 (1 = in step). */
  rate?: number;
  /** Beats the track's pattern starts late (negative: early); it wraps. */
  phase?: number;
  /** Beats of the track that repeat, default the whole song loop. */
  cycle?: number;
  /**
   * Stepped phasing (SDK 1.19.0), as in Reich's Piano Phase: hold `hold`
   * cycles in step, then move `shift` beats ahead over `drift` cycles, and
   * repeat. Needs `cycle`; replaces `rate`. `stepPhasing()` builds it.
   */
  steps?: Readonly<{
    shift: number;
    hold: number;
    drift: number;
  }>;
}>;
```

## `TrackSpec`

Frozen track built by `track()`; `song()` consumes it. Beats, not ticks.

```ts
export type TrackSpec = Readonly<{
  kind: "track";
  id: string;
  name: string;
  slug: string;
  instrument: string;
  muted: boolean;
  solo: boolean;
  volume: number;
  pan: number;
  filter: Readonly<
    {
      cutoff: number;
      resonance: number;
    } & Partial<FilterInput>
  > | null;
  delay: Readonly<
    {
      beats: number;
      feedback: number;
      mix: number;
    } & Partial<DelayInput>
  > | null;
  reverb: Readonly<
    {
      mix: number;
      size: number;
    } & Partial<ReverbInput>
  > | null;
  fx: FxInput | null;
  synth: SynthInput | null;
  sampler: SamplerSpec | null;
  wavetable: WavetableSpec | null;
  /** String engine settings (SDK 1.21.0); present only when set. */
  string?: StringInput;
  /** Granular engine settings (SDK 1.23.0); null when not granular. */
  granular?: GranularInput | null;
  automation: Readonly<Required<AutomationInput>>;
  /** Every hit resolved to its pitch slot. */
  notes: readonly NoteSpec[];
  /** Rhythm rows in order (voice names as written). */
  rhythm: readonly RhythmSpec[];
  kit: string | null;
  /** Present only when `track({ time })` set something. */
  time?: TrackTimeInput;
  /** Performance (SDK 1.15.0); present only when set. */
  glide?: Readonly<{
    time: number;
    mode: GlideMode;
  }>;
  pedal?: readonly (readonly [number, PedalState])[];
  /** Soft and sostenuto pedals (SDK 1.26.0); present only when set. */
  softPedal?: readonly (readonly [number, PedalState])[];
  sostenuto?: readonly (readonly [number, PedalState])[];
  velocityCurve?: Readonly<{
    curve: Exclude<VelocityCurveName, "linear">;
    fixed?: number;
  }>;
  humanize?: Readonly<{
    timing?: number;
    velocity?: number;
    length?: number;
    seed: number;
  }>;
  tuning: ScoreTuning | null;
  /** Modelled piano settings (SDK 1.24.0); present only when set. */
  keys?: KeysInput;
  /** Modal settings (SDK 1.25.0); present only on a modal track. */
  modal?: Readonly<
    {
      preset?: ModalPresetName;
    } & ModalParams
  >;
  /** Texture settings (SDK 1.45.0); present only on a texture track. */
  texture?: Readonly<
    {
      type?: TextureType;
    } & TextureParams
  >;
  /** Guitar fretting (SDK 1.27.0); present only when set. */
  guitar?: GuitarSetup;
  /** Wind settings (SDK 1.30.0); present only on a wind-engine track. */
  wind?: Readonly<
    {
      preset?: WindPresetName;
    } & WindParams
  >;
  /** Sing settings (SDK 1.32.0); present only on a sing track. */
  sing?: Readonly<
    {
      preset?: SingPresetName;
    } & SingParams
  >;
  /** Audio clips (SDK 1.32.0), flattened, paths project-relative; present only when set. */
  clips?: readonly AudioSpec[];
  /** Takes (SDK 1.32.0); present only when set. */
  takes?: readonly TakeSpec[];
  /** Vocoder settings (SDK 1.32.0); `src` as written until `song()`. */
  vocoder?: Readonly<
    {
      preset?: VocoderPresetName;
    } & VocoderParams
  >;
  /** Pitch correction (SDK 1.32.0); present only when set. */
  autotune?: AutotuneSettings;
  /** Machine vox (SDK 1.36.0); present only when set. */
  vox?: TrackVoxSpec;
  /** The patch this track plays (SDK 1.35.0); instrument is then `"patch"`. */
  patch?: PatchSpec | PatchRefSpec;
  /** Effect patches (SDK 1.35.0), in order. */
  fxPatch?: readonly PatchSpec[];
  /** Signals on macros and lanes (SDK 1.35.0); `song()` bakes them. */
  mods?: Readonly<Record<string, PatternSignal>>;
  lanes?: Readonly<Record<string, PatternSignal>>;
}>;
```

## `GlideMode`

```ts
export type GlideMode = "legato" | "mono" | "poly";
```

## `PedalState`

```ts
export type PedalState = "down" | "half" | "up";
```

## `VelocityCurveName`

```ts
export type VelocityCurveName = "linear" | "soft" | "hard" | "fixed";
```

## `zzfx`

A raw ZzFX parameter array (Strudel `zzfx([...])`, ZzFX's own layout:
volume, randomness, frequency, attack, sustain, release, shape,
shapeCurve, slide, deltaSlide, pitchJump, pitchJumpTime, repeatTime,
noise, modulation, bitCrush, delay, sustainVolume, decay, tremolo,
filter) as a `z_*` instrument and synth parameters to spread into a
track. Empty slots take ZzFX's defaults; frequency and sustain time come
from each note. `filter` > 0 is a high-pass in Hz, < 0 a low-pass.

```ts
track({ name: "blip", ...zzfx([, , , 0.01, , 0.15, 2, , 5]), notes });
```

```ts
export declare function zzfx(
  values: readonly (number | null | undefined)[],
): Readonly<{
  instrument: string;
  synth: SynthInput;
}>;
```

## `track`

```ts
export declare function track(input: TrackInput): TrackSpec;
```

## `slugify`

Directory name for a track: lowercase, spaces and runs of punctuation
become one `-` (`"Keys 2"` → `keys-2`); empty input becomes `track`.
Same rule as DAWN's `trackSlug`, copied so this file stays standalone.

```ts
export declare function slugify(name: string): string;
```

## `voiceSlots`

Pitch slot for each one-shot voice, in voice-name order from 36.

```ts
export declare function voiceSlots(
  spec: SamplerSpec,
): ReadonlyMap<string, number>;
```
