Skip to content

Variations and reproducible seeds: 're-roll' and 'more like this' for generated pads #56

Description

@brxs

Depends on #54 (seed exposure + low-noise audio-to-audio).

Problem

Generation today is a one-shot: a pad comes back, and if it is almost right there is no way to nudge it — re-running the same prompt rolls a fresh random seed (sa3_mlx.py picks one when --seed is omitted) and the near-miss is lost. There is also no reproducibility: a great pad cannot be re-derived or tweaked because its seed was never captured. #54 exposes --seed and low --init-noise-level audio-to-audio, which together give the two operations performers expect: re-roll (same prompt, new seed) and vary (a small perturbation of this clip).

Proposed approach

  • Capture the seed. sa3.generate() returns/records the seed it used; the samples-library recipe (ADR-0022, useDeck.ts:1339) stores prompt + seed + seconds + kind + steps so any saved pad is reproducible.
  • Re-roll a slot: regenerate the same prompt with a fresh seed.
  • Vary ("more like this"): feed the existing clip back as Thread Stable Audio 3's full generation surface (audio-to-audio, inpainting, CFG, seed) through the pipeline #54's init_audio at a low init_noise_level for a near-neighbor; a small "amount" knob spans subtle → loose.
  • Variations land as new slots/library entries (non-destructive), each with its own recipe.

Acceptance criteria

  • Every generated pad records the seed actually used; re-running a saved recipe (same prompt + seed + seconds + steps) reproduces the audio.
  • A vary action produces an audible near-neighbor of the source clip; a re-roll produces a fresh take of the same prompt; both are non-destructive (new slot/entry) and carry their own recipe.
  • Backend tests cover the seed round-trip (same seed ⇒ same bytes) and that vary differs from the source but less than a re-roll.
  • Strings via i18n; house style; npx tsc -p tsconfig.app.json --noEmit clean.

Scope & non-goals

In scope: seed capture/replay, re-roll, vary. Non-goals: the plumbing (#54); reskinning external audio (that is the reskin issue — this varies a clip that is already SA3 output); a full prompt-history/branching UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions