test: qualify internal devices across DSP, persistence and GUI workflows

This commit is contained in:
Johannes Findeisen 2026-11-05 23:44:48 +01:00
commit e76552e8dd
7 changed files with 389 additions and 8 deletions

View file

@ -1073,6 +1073,8 @@ They require separate model/layout designs and acceptance tests.
## Phase 38 — Internal instruments and effects
### Tasks and acceptance criteria
- [x] Add always-available Soft Keys and Sub Bass MIDI instrument presets.
- [x] Add Delay and Reverb with bounded controls and effect automation.
- [x] Integrate track selection, graph wire insertion, undo and saved projects.
@ -1080,19 +1082,196 @@ They require separate model/layout designs and acceptance tests.
- [x] Verify DSP tails, block partition consistency, note release/panic and persistence.
- [x] Refresh application screenshots and add internal device editor views.
See [BUILTIN_DEVICES.md](BUILTIN_DEVICES.md) for controls and explicit limitations.
### Implementation status
Implemented for the bounded initial device set. Audited 2026-11-05 against
`src/plugin/builtin.c`, the shared plugin host, track instrument selector,
graph commands and v13 persistence. Soft Keys and Sub Bass are fixed 32-voice
presets; Delay and Reverb each expose three bounded, automatable controls.
Preparation owns buffer allocation; processing uses preallocated storage.
Internal devices use virtual identities rather than loading external modules;
the reader retains v1–v12 compatibility. Actual device control screenshots are
listed in [screenshots/README.md](../screenshots/README.md).
`tests/unit/test_builtin.c` covers both effect tails and block partitions, dry
mix, invalid feedback, both instruments' release/panic, mix automation and a
keys/delay project round trip. Shared GUI tests cover instrument selection,
history and plugin editing, but do not constitute a dedicated end-to-end matrix
for all four internal devices. Additional qualification is tracked in Phase 40.
Missing extensions: editable instrument parameters/presets, pitch bend, sample
instruments, click-free/tempo-synced delay, stereo reverb/diffusion, explicit seek
history policy and automatic tail rendering. These are planned in Phases 41–44;
they are not part of the checked initial subset. See
[BUILTIN_DEVICES.md](BUILTIN_DEVICES.md) for controls and explicit limitations.
---
## Phase 39 — Detachable transport and mixer
### Tasks and acceptance criteria
- [x] Float/dock the existing transport and mixer without duplicating state.
- [x] Keep BPM and loop settings in the shared transport controls.
- [x] Recover arrangement space and retain resizable mixer channels.
- [x] Support close-to-dock, Dock all, floating playback shortcuts and safe shutdown.
- [x] Exercise lifecycle, settings and resizing in GUI tests and capture floating views.
See [WORKSPACE.md](WORKSPACE.md) for usage and session-only layout limitations.
### Implementation status
Implemented for the transport and mixer. Audited 2026-11-05 against
`src/gui/main_window.cpp` and `tests/integration/test_gui.cpp`. Detaching
reparents the existing widgets on the GUI thread; BPM, loop settings and mixer
state remain shared. Docking restores ownership and arrangement space, and the
destructor docks panels before destroying their windows. Tests exercise repeated
detach/dock, close-to-dock, shared BPM/loop state, floating playback shortcuts,
main/floating resizing and failed/successful shutdown. Floating screenshots are
listed in [screenshots/README.md](../screenshots/README.md).
Layout and window positions are session-only. The floating transport requires
1220 pixels of width; mixer minimum size is 600 × 420. Other editors cannot be
detached, and general dock layouts are absent. Persistence, compact transport
and additional panels are tracked in Phases 45–46. See
[WORKSPACE.md](WORKSPACE.md) for usage and limits.
### Audit validation (Phases 38–39)
Warning-enabled `make BUILD_DIR=build/roadmap-audit all gui test` passed,
including `test-builtins`. Sequential GUI runs with the same build passed:
`test-gui`, `test-gui-instruments`, `test-gui-modern-plugins` and
`test-gui-plugins`. The initial parallel GUI invocation reported passing test
assertions but failed Xvfb cleanup; sequential reruns exited successfully.
Historical sanitizer/live-JACK evidence in WORKSPACE.md is separate from this
audit; sanitizers, live JACK and physical listening were not rerun here.
---
## Phase 40 — Internal Device Acceptance Coverage
### Goal
Close the dedicated validation gaps in the initial Phase 38 device set.
### Tasks and acceptance criteria
- [x] Exercise all four internal devices through GUI selection/addition, wire insertion where applicable, control editing, undo/redo and save/reopen.
- [x] Round-trip both instruments and both effects, including automated controls, and compare rendered output.
- [x] Verify older-format migration alongside v13 identities and reject malformed internal identities transactionally.
- [x] Test sustain, repeated notes, voice exhaustion, seek/stop/panic and instrument block partition consistency.
- [x] Cover preparation/allocation failures and callback allocation/free guards for internal devices.
- [x] Document repeatable manual listening checks for both presets and representative effect settings.
### Implementation status
Implemented: dedicated all-device GUI/history/persistence tests, exact persisted
render comparisons, malformed-identity rollback, voice/transport regressions and
allocation-failure/callback guards. Warning-enabled core tests, reliability, GUI
and listening-preview generation pass. See BUILTIN_DEVICES.md for repeatable
manual checks; human listening and physical hardware remain unverified.
---
## Phase 41 — Editable Internal Instruments and Presets
### Goal
Extend the fixed Soft Keys/Sub Bass presets into editable instruments.
### Tasks and acceptance criteria
- [ ] Define bounded oscillator, envelope and filter controls with metadata and defaults that preserve existing preset sounds.
- [ ] Provide instrument parameter editing, automation and reusable preset save/load through public C APIs.
- [ ] Support channel pitch bend with a documented range and sustain/note lifecycle behavior.
- [ ] Persist parameters and presets with explicit version migration, undo and failed-preparation rollback.
- [ ] Verify sample timing, block partition consistency, bounds, aliasing behavior and callback safety.
### Implementation status
Planned. The current instruments expose no editable parameters or pitch bend.
---
## Phase 42 — Internal Sample Instrument
### Goal
Provide sample-based sounds beyond the current oscillator presets.
### Tasks and acceptance criteria
- [ ] Define supported sample formats, mapping, looping, envelopes, voice limits and memory budgets.
- [ ] Load/prepare samples outside callbacks and expose an instrument editor with undo.
- [ ] Persist sample references and mappings with missing-media reporting and relinking.
- [ ] Provide original or appropriately licensed example sounds and document their licenses.
- [ ] Test playback rate conversion, boundaries, voice release, missing assets and project reload.
### Implementation status
Planned. Phase 38 supplies no sample instrument or sample library.
---
## Phase 43 — Smooth Delay and Stereo Reverb
### Goal
Address the documented sound-design and transition limits of the basic effects.
### Tasks and acceptance criteria
- [ ] Smooth or crossfade delay-time changes and define automation behavior without abrupt read-head jumps.
- [ ] Add tempo-synced delay divisions with deterministic tempo/seek behavior.
- [ ] Add true stereo processing and reverb diffusion/room controls rather than independent mono instances alone.
- [ ] Preserve old projects' effect identities, parameters and sound, or provide an explicit compatibility mode.
- [ ] Test stability at parameter extremes, stereo response, automation partitions and transition artifacts; document listening results.
### Implementation status
Planned. Delay time can click; reverb uses four damped mono combs without a room
model or stereo diffusion. Current decay is a feedback coefficient, not seconds.
---
## Phase 44 — Effect History and Tail Rendering
### Goal
Make discontinuities and effect tails explicit in playback and export.
### Tasks and acceptance criteria
- [ ] Define retained/reset effect history for seek, stop, loop wrap and project/plan replacement.
- [ ] Implement the chosen history policy without callback allocation or unsafe state sharing.
- [ ] Add bounded automatic or user-configurable tail rendering after the arrangement/export endpoint.
- [ ] Expose tail limits and cancellation, including silent input and non-decaying/high-feedback cases.
- [ ] Test seek/loop reproducibility and complete delay/reverb tails across processing block sizes.
### Implementation status
Planned. Seeks currently retain effect history; tails need continued rendering
and do not automatically extend playback/export.
---
## Phase 45 — Persistent Panel Layouts and Compact Transport
### Goal
Retain useful floating layouts across sessions and support narrower displays.
### Tasks and acceptance criteria
- [ ] Persist docked/floating state and panel geometry through the application preferences workflow.
- [ ] Restore layouts safely when monitors or display sizes change; keep all panels reachable.
- [ ] Provide a compact/responsive floating transport while retaining BPM, loop and playback controls.
- [ ] Preserve close-to-dock, Dock all, shortcuts, editing focus protection and safe shutdown.
- [ ] Test restart, invalid settings, off-screen geometry, narrow sizes and repeated dock/resize cycles.
### Implementation status
Planned. Phase 39 starts docked each session and its transport minimum is 1220 pixels.
---
## Phase 46 — Additional Dockable Editors
### Goal
Extend Phase 39's two-panel arrangement to a general editor workspace.
### Tasks and acceptance criteria
- [ ] Define supported dock locations and layout ownership for sequencer, piano roll and modular graph panels.
- [ ] Detach/dock each supported editor without duplicating project, selection or history state.
- [ ] Support resizable pinned track headers and preserve editing coordinates, scrolling and focus after reparenting.
- [ ] Integrate with Phase 45 layout persistence and provide a safe reset-layout action.
- [ ] Verify minimum/large layouts, cross-panel editing, repeated reparenting and shutdown/error paths.
### Implementation status
Planned. Phase 39 only detaches transport and mixer; broader docking and
resizable pinned headers from Phase 37 remain outstanding. These follow-up
phases cover gaps found in Phases 38–39 and their documented limitations;
unrelated outstanding features in earlier phases retain their existing status.
---