Spaces:
Sleeping
Progress log
Last updated: 2026-05-12
Pass 1: project review, timing, and Gradio replacement
Completed:
- Inspected the original project structure and active Gradio entrypoints.
- Moved previous Gradio interfaces into
legacy/. - Created
pipeline_runner.pyas the timed orchestration layer. - Created
app.pyas a FastAPI backend. - Created a custom no-build browser frontend under
web/. - Added stage timing to each extraction run.
- Added synthetic benchmarking via
scripts/benchmark_subprocesses.py. - Added initial docs for project review, timing/realtime, API, UI, and remaining work.
Outcome:
The application became usable without Gradio and produced per-run manifests/artifacts.
Pass 2: feature ledger and continued development
Completed in this pass:
- Added first-class docs for features, tasks, and progress.
- Added
GET /api/jobsfor active/completed run listing. - Added run-history UI panel that indexes
.runs/*/output/manifest.json. - Added disk caching for decoded full mix and Demucs stem outputs.
- Extended cache clearing to remove both memory and disk cache.
- Added
clustering_modepipeline parameter. - Added
online_previewclustering using prototype assignment. - Added frontend controls for clustering mode and disk cache.
- Fixed duplicate sample writes in
sample_extractor.build_archive. - Updated README and docs to reflect the new state.
Outcome:
The project now has a clearer product surface: final-quality batch extraction, faster online-style preview clustering, persistent run history, and explicit docs tracking what is done versus still missing.
Current assessment
The application is not “fully complete” as an editing workstation, but it is substantially implemented as an extraction and review workstation. The remaining gaps are concentrated around mutating corrections/editing, run comparison, and frontend engineering hardening.
Next recommended pass
Implement the editing loop:
- Add edit state for deleted/restored hits and shifted onsets.
- Add label change, cluster reassignment, merge, and split.
- Re-export without rerunning Demucs/onset detection when only grouping changes.
- Save edit decisions into the manifest.
- Add side-by-side run comparison for parameter tuning.
Validation performed in this pass
- Compiled active Python files with
python3 -m py_compile app.py pipeline_runner.py sample_extractor.py scripts/*.py. - Ran FastAPI smoke job through
scripts/test_api_job.py. - Ran an online-preview API smoke job with synthetic audio.
- Verified
GET /api/jobshistory output andPOST /api/cache/clearbehavior. - Verified SSE completion and review-hit artifact serving.
- Refreshed batch and online benchmark JSON files:
docs/benchmark-subprocesses.jsondocs/benchmark-online-preview.json
Pass 3: hit review and streaming progress
Completed in this pass:
- Added
GET /api/jobs/{job_id}/eventsas a server-sent-events progress stream. - Updated the frontend to consume SSE via
EventSource, with the existing polling loop retained as fallback. - Added per-hit review artifact export under
review/hits/. - Added a top-level
hitsarray to each run manifest with onset, duration, classification, cluster label, representative flag, and file path. - Added API serialization for hit playback/download URLs.
- Added selected-hit and selected-sample audio players.
- Made waveform onset markers clickable by selecting the nearest detected hit.
- Added hit table and sample-table audition controls.
- Hardened artifact file serving by using resolved path containment via
Path.relative_to(). - Refreshed batch and online benchmark JSON files after the review-hit export change.
Outcome:
The app now supports a real review loop for inspecting what the onset detector and clustering produced. Users can audition individual detected slices, representative samples, stem audio, and reconstruction audio from one screen. Progress updates are lower-latency and less wasteful via SSE while still remaining robust in browsers that need polling fallback.
Pass 4: interactive supervised UX foundation
Completed in this pass:
- Added the supplied interactive UX document set under
docs/interactive-ux/. - Read and aligned the UX documents with the project as currently implemented.
- Added
supervised_state.pyfor persistent semantic state beside each completed run manifest. - Added
supervision_state.jsongeneration after each successful extraction. - Added state schema for hits, clusters, constraints, events, suggestions, confidence, review queue, and undo snapshots.
- Added supervised editing endpoints:
GET /api/jobs/{job_id}/statePOST /api/jobs/{job_id}/hits/{hit_id}/movePOST /api/jobs/{job_id}/hits/{hit_id}/pull-outPOST /api/jobs/{job_id}/hits/{hit_id}/suppressPOST /api/jobs/{job_id}/hits/{hit_id}/reviewPOST /api/jobs/{job_id}/clusters/{cluster_id}/lockGET /api/jobs/{job_id}/suggestionsPOST /api/jobs/{job_id}/suggestions/{suggestion_id}/acceptPOST /api/jobs/{job_id}/suggestions/{suggestion_id}/rejectGET /api/jobs/{job_id}/explain/cluster/{cluster_id}POST /api/jobs/{job_id}/undo
- Added an interactive supervision UI panel with:
- state summary,
- selected-hit actions,
- target cluster picker,
- outlier-first review queue,
- cluster board,
- suggestion inbox,
- constraint/event log,
- cluster explanation drawer.
- Added
scripts/test_interactive_supervision.pyto verify the supervised API loop.
Outcome:
The app is now an extraction and supervised-review workstation at the semantic-state level. User corrections are persisted as constraints/events and can be inspected, suggested from, and undone. The next required step is edited-state export so these decisions affect downloadable artifacts.
Current assessment after Pass 4
The project now satisfies the first interactive UX milestone for replayable supervised state:
analyze audio
→ inspect hits/clusters
→ move/pull/suppress/favorite/lock
→ persist constraints/events
→ update confidence and review queue
→ generate/accept/reject suggestions
→ explain clusters
→ undo semantic edits
→ reload completed run with decisions intact
It now satisfies the first full semantic-edit loop because edited semantic state can be rendered into separate supervised sample WAVs, MIDI, reconstruction, and ZIP output.
Next recommended pass after Pass 4
- Add cluster merge/relabel/split workflows.
- Add feature-vector cache for true local reclustering.
- Add edited-vs-original run comparison.
- Add browser-level UI tests and migrate frontend to TypeScript/Vite after UX stabilizes.
Pass 5: supervised export, force-onset, restore, and suggestion diffs
Completed in this pass:
- Added
supervised_export.pyto rendersupervision_state.jsoninto edited artifacts undersupervised/. - Added
POST /api/jobs/{job_id}/exportfor edited sample-pack export. - Added
POST /api/jobs/{job_id}/hits/force-onsetto create user-forced hit slices fromstem.wav. - Added add-onset waveform mode in the frontend.
- Added
POST /api/jobs/{job_id}/hits/{hit_id}/restoreand a restore button for suppressed hits. - Added exact suggestion diff previews through
suggestion.diffand a UIDiffaction. - Updated supervised export to exclude suppressed hits and honor favorite/pinned representatives.
- Added
scripts/test_supervised_export_and_force_onset.py. - Added
docs/SUPERVISED_EXPORT_AND_FORCE_ONSET.mdand updated feature/API/task/progress docs.
Outcome:
The project now closes the main semantic-edit loop:
analyze audio
→ inspect hits/clusters
→ move/pull/suppress/restore/favorite/lock/force-onset
→ inspect suggestions and diffs
→ export edited WAV/MIDI/reconstruction/ZIP artifacts
The original batch artifacts remain immutable. Edited outputs are written separately under supervised/.
Validation performed in this pass:
python3 -m py_compile app.py pipeline_runner.py sample_extractor.py supervised_state.py supervised_export.py scripts/*.pynode --check web/app.jspython3 scripts/test_supervised_export_and_force_onset.pypython3 scripts/test_sse_and_review_hits.pypython3 scripts/test_interactive_supervision.pypython3 scripts/test_api_job.py
Next recommended pass after Pass 5:
- Add cluster merge/relabel/split workflows.
- Add cached feature-vector local reclustering around edited hits.
- Add edited-vs-original run comparison.
- Add browser-level UI tests and migrate the frontend to TypeScript/Vite once the UX stops shifting.
Pass 6: visual simplification toward the supplied reference UI
Completed in this pass:
- Reworked
web/index.htmlaround a simpler first screen: top file/action bar, large waveform workspace, compact right-side extraction controls, sample cards, and lower utility panels. - Replaced the previous dark dashboard styling with a light, minimal, card-based visual system closer to the supplied screenshot.
- Moved advanced extraction controls into a collapsible panel so the primary workflow exposes only stem, sensitivity, cluster count, extraction, export, and fast-mode decisions.
- Added representative sample cards with waveform thumbnails decoded from the sample WAV URLs in the browser.
- Updated waveform rendering to use grey filled waveforms plus colored lollipop onset markers similar to the reference image.
- Preserved all existing IDs/API wiring so supervised editing, SSE progress, run history, force-onset, and edited export continue to work.
Validation performed in this pass:
python3 -m py_compile app.py pipeline_runner.py sample_extractor.py supervised_state.py supervised_export.py scripts/*.pynode --check web/app.js- HTML parser sanity check for
web/index.html python3 scripts/test_api_job.py
Outcome:
The app now looks and behaves more like a focused sample-extraction tool instead of a generic control dashboard while keeping the advanced review/supervision functionality available below the main workflow.
Pass 6: minimal waveform-first UI
Completed in this pass:
- Reworked the frontend visual language from a dense workstation dashboard into a light waveform-first interface.
- Added the top file identity bar and primary purple extraction action.
- Promoted the waveform and extracted sample cards as the default workflow.
- Moved advanced controls and power-user tools into collapsible areas.
Outcome:
The app matched the general direction of the supplied reference image, but still had visible complexity: separate audio players, a waveform header, fast-mode buttons in the right card, and multiple utility panels visible in the main page flow.
Pass 7: reference-alignment hardening
Completed in this pass:
- Removed the visible waveform header and made the waveform card visually quiet.
- Added a single custom transport row with play, elapsed/total time, and seek line.
- Hid native source/stem/reconstruction/hit/sample audio elements from the default layout while preserving playback behavior.
- Moved
Online preview modeandFast full-mix modeinto the collapsedAdvancedpanel. - Collapsed pipeline, run history, supervision, and detailed tables into one
Review & editworkbench below the sample cards. - Simplified sample cards to thumbnail waveform, play affordance, and label-first presentation.
- Updated docs to distinguish visual-reference work from remaining interaction-depth work.
Outcome:
The default UI is now aligned with the supplied image: file/action bar, large waveform card, compact right controls, one transport row, and sample cards. Advanced extraction and semantic editing remain available but no longer dominate the first screen.
Pass 8: fixed no-scroll workstation layout and upload repair
Completed in this pass:
- Reworked
web/index.htmlinto a fixed workstation shell: top bar, left sidebar, center workspace, right sidebar, and bottom dock. - Locked the document viewport with
overflow: hiddenand moved long content into panel-local scroll containers. - Moved pipeline logs/history/selection context into the left sidebar.
- Moved extraction, export, and advanced settings into the right sidebar.
- Moved semantic review/edit tools and raw tables into the bottom dock.
- Added an explicit top-bar
Upload audioaffordance. - Added whole-window drag/drop handling so dropping a file anywhere on the app selects it instead of opening it in the browser.
- Added a full-screen drag overlay to make the drop target obvious.
- Preserved existing frontend ids and backend APIs so extraction, SSE, supervision, force-onset, and edited export remain wired.
Outcome:
The UI no longer behaves like a scrollable webpage. It now behaves like a compact desktop-style sample extraction workstation with simple expandable tool panels around a central waveform/sample workspace.
Pass 9: full-context reproduced audio and clearer parameters
Completed in this pass:
- Added explicit source/context/reconstruction layers to the pipeline export:
source.wavstem.wavcontext_bed.wavtarget_reconstruction.wavreconstruction.wav
- Changed
reconstruction.wavto a full-context reproduced mix: non-target context bed plus sample-triggered target reconstruction. - Kept
target_reconstruction.wavas the isolated sample-only target layer for debugging and focused listening. - Matched the target reconstruction RMS to the target stem before mixing it back into context.
- Updated
sample-pack.zipto include both the full-context reproduced mix and target-stem reconstruction. - Updated supervised edited export so edited packs follow the same audio-layer model under
supervised/. - Added Source / Stem / Reproduced preview modes to the single transport row; completed jobs default to Reproduced.
- Reworked the right sidebar into Common controls vs Advanced parameters.
- Grouped advanced parameters by pipeline stage: stem separation, hit detection, grouping, export/cache.
- Added
docs/REPRODUCED_AUDIO_AND_PARAMETERS.md.
Outcome:
The app is easier to understand for normal use: the main right-side controls are now only the few controls users are likely to touch repeatedly, while lower-level DSP/model controls stay available but grouped by stage. Reproduced audio is now useful for musical judgment because separated-stem runs are previewed inside the rest of the mix rather than as an isolated sample-triggered stem only.
Pass 10: clean default UI
Completed in this pass:
- Collapsed secondary panels by default: source hints, selection context, pipeline, run history, exports, and review/edit no longer open on initial load.
- Reduced the bottom dock to a compact tab bar unless a bottom tool is explicitly opened.
- Shortened the top bar and reduced logo/upload/backend/action button visual weight.
- Shrunk sidebars, panel padding, gaps, transport height, and sample-card dimensions to give the waveform and samples more room.
- Hid common-control helper paragraphs and long field hints from the default extraction flow.
- Preserved advanced controls, logs, history, supervision, tables, and edited export behind existing expandable panels.
- Added
docs/CLEAN_DEFAULT_UI.mdto document the clean-default layout contract.
Outcome:
The UI remains a fixed workstation with sidebars and a bottom dock, but the first screen is now much less cluttered. The visible default workflow is upload, extract, listen, inspect waveform, and audition sample cards; debug/review/power-user tools are available only when opened.
Pass 11: immediate waveform and real progress flow
Completed in this pass:
- Added browser-side waveform rendering immediately after file selection/drop using Web Audio decoding.
- Added a persistent uploaded-source overview so the waveform is visible before backend extraction starts.
- Added a backend
progressobject to job payloads and SSE job events. - Extended
StageTimingwithprogress,work_done, andwork_total. - Added chunk-accurate Demucs stem progress reporting through a progress pool passed to
apply_model. - Changed the waveform renderer to show active extraction progress as an accent-colored completed region on the left and a neutral remaining region on the right.
- Added a
Start hereleft-sidebar flow with Load → Controls → Extract → Review/export states. - Updated the stage list to include exact per-stage progress bars where progress is available.
- Added
docs/IMMEDIATE_WAVEFORM_AND_REAL_PROGRESS.md.
Outcome:
The app now starts with a clear sequence instead of a blank workstation. Uploading or dropping a file immediately produces a waveform, and extraction progress is visualized directly on that waveform using backend-reported progress only. The UI does not fake ETA or time-based progress; non-instrumented stages step only at real boundaries.
2026-05-12 — API validation and visible error pass
Completed:
- Fixed a real
/api/jobsregression where the UI submittedsubdivisionas a string and the backend rejected it with400. - Added backend parameter coercion before validation for integer, float, and boolean pipeline params.
- Updated frontend
collectParams()to use/api/config.defaultsas the type source for controls, including<select>elements. - Added a global error banner so failed API requests and pipeline errors are visible without browser devtools.
- Removed a duplicate
historyListid in the HTML. - Added
docs/API_ERRORS_AND_PARAMETER_VALIDATION.mdandscripts/test_param_validation_and_api_errors.py.
Validation:
python3 scripts/test_param_validation_and_api_errors.py
node --check web/app.js
python3 -m py_compile app.py pipeline_runner.py sample_extractor.py supervised_state.py supervised_export.py scripts/*.py
Pass: automatic simple card flow
Completed in this pass:
- Changed the default interaction model from manual configuration to automatic processing after drop/upload.
- Added
PipelineParams.auto_tuneand a newAutomatic parameter tuningpipeline stage. - Added progressive
sampleevents from the export stage and serialized active-jobpartial_samples. - Redesigned sample cards into type-grouped columns with draw/dismiss/trim/extend actions.
- Added waveform zoom and pan while preserving click-to-select/force-onset semantics.
- Replaced expensive representative scoring internals with a lightweight deterministic scorer.
- Added fallback MIDI writing when
pretty_midiis missing. - Hardened BPM detection against sparse/empty beat events.
Validation performed:
- Python compile checks for app, pipeline, DSP, supervision, export, and scripts.
node --check web/app.js.- DOM id/reference consistency check.
scripts/test_param_validation_and_api_errors.py.scripts/test_progress_contract.py.scripts/test_api_job.py.scripts/test_sse_and_review_hits.py.scripts/test_supervised_export_and_force_onset.py.scripts/test_interactive_supervision.py.
2026-05-12 Reference image UI alignment
- Reworked the frontend shell to match the provided Sample Extractor reference image.
- Added centered file picker/current filename, right-aligned export actions, persistent right settings panel, waveform-first canvas, grouped sample columns, and compact bottom selection bar.
- Kept automatic drop-to-process behavior and progressive sample-card rendering.
- Moved secondary pipeline/history/supervision/tables into a compact tools drawer.
Pass 14: selected cards and Spleeter backend
Completed in this pass:
- Added
spleeteras the default separation backend, with selectablespleeter:2stems,spleeter:4stems, andspleeter:5stemsprofiles. - Kept
demucsas a quality/fallback backend andnoneas the full-mix preview backend. - Added optional
requirements-spleeter.txtinstead of forcing TensorFlow/Spleeter into the base install. - Added per-card checkbox state with manual select-all/clear behavior.
- Added selected-only backend export via
POST /api/jobs/{job_id}/export-selected. - Made
draw anotherpersist the chosen representative in semantic state. - Made trim/extend rewrite playable preview audio immediately under
overrides/hits/. - Added
scripts/test_selected_export_card_actions.py.
Outcome:
The default app now behaves more like a card review tool: drop audio, let Spleeter/fallback separation run, review grouped cards, select/dismiss/draw/trim, and export only the selected pack.
Upload/runtime fallback update (2026-05-12)
- Added a visible top-bar
Choose audioaffordance in addition to whole-app drag/drop. - Fixed the default hidden state of the error banner so placeholder errors are not shown on page load.
- API errors now surface request path/status/detail in the visible banner and pipeline logs.
/api/confignow includes runtime diagnostics for optional separation backends.- If Spleeter is unavailable, the simple UI keeps the app usable by switching to full-mix mode; backend fallback also uses full-mix rather than silently launching Demucs.