-
Notifications
You must be signed in to change notification settings - Fork 0
Data Flow
mzuelch edited this page Jan 25, 2026
·
3 revisions
PATCHBAY’s end-to-end data flow is: Audio → Preprocess → Chunk plan → Anchor prompting → Model inference → Reconstruction → Postprocess → Export.
flowchart TD
A[Audio input] --> B[Decode / normalize dtype]
B --> C{Input AudioFX?}
C -- yes --> D[Apply input effects]
C -- no --> E[Continue]
D --> F[Chunk planning]
E --> F
F --> G[Anchor prompting per chunk]
G --> H[Inference per chunk]
H --> I["Reconstruction (overlap-add)"]
I --> J{Output AudioFX?}
J -- yes --> K[Apply effects per stream]
J -- no --> L[Export]
K --> L
-
Load & decode audio
- Input audio is loaded and converted to a floating point waveform (multi-channel supported).
- Optional resampling to the model’s expected sample rate is performed.
-
(Optional) Input AudioFX
- Any AudioFX assigned to the
inputstream is applied before chunking (see AudioFX Plugins).
- Any AudioFX assigned to the
-
Chunk planning
- Long audio is split into windows (
max_len_s) with overlap (overlap_s) to reduce boundary artifacts. - See Chunking and Chunking & Reconstruction.
- Long audio is split into windows (
-
Anchor prompting
- Anchors are clipped to valid ranges and mapped into each chunk.
- Each chunk’s prompt is constructed according to
anchor_mode. - See Anchor Prompting Internals and Anchor Algorithms.
-
Model inference
- The SAM-Audio model is invoked per chunk via the backend adapter.
- See Backend API and Backend Integration.
-
Reconstruction
- Chunk outputs are stitched back into full-length target/residual using overlap-add with windowing.
- See Chunking & Reconstruction.
-
(Optional) Output AudioFX
- AudioFX can be applied separately to
targetandresidualstreams (and persisted per stream). - See AudioFX Plugin API.
- AudioFX can be applied separately to
-
Write outputs
-
target.wavandresidual.wav(or user-selected paths) are written. - See Export & Files.
-
- Orchestration:
patchbay_backend/pipeline.py - Chunking:
patchbay_backend/chunking.py - Anchors:
patchbay_backend/anchors.py - SAM-Audio adapter:
patchbay_backend/separator.py - GUI worker:
patchbay_desktop_gui/gui/worker.py
Last updated: 2026-01-24
PATCHBAY • MIT License • Wiki content is intended to match PATCHBAY 0.1.x.
- Home
- Installation
- Quickstart
- User Guide
- Input & Anchors
- Description & Run
- Output
- Export & Files
- Runtime Settings
- Settings & Persistence
- FAQ
- Troubleshooting
- Architecture
- Data Flow
- Backend Interface
- Anchor Algorithms
- Chunking & Reconstruction
- Logging & Debugging
- Parameter Persistence