Repository navigation
fix!: calibrate drain budgets and processor resets - #75
google-labs-stitch[bot] wants to merge 8 commits into
Conversation
- Initialize Punch with the configured gain in Processor::new. - Calibrate reverb tail budgets from the tap layout at -60 dBFS. - Defer the drain reset to the next non-empty zero-frame drain call. - Clear the harmony, resynthesis and correction state on a reset. - Reset the reverb filters, the pitch tracker, formants and the seed. - Update the lifecycle documentation in Rust, Wasm and the README.
- Resolve the drainMono documentation conflict in src/wasm.rs. - Keep the random stream across stereo_output changes in Processor.
- Keep the dirty check in Reverb::reset in src/effects/reverb.rs. - Reset both damping filters inside the dirty block of Reverb::reset.
|
Review: Preferred over #65 and #106 — zero public API expansion, accurate -60 dBFS reverb tail budgets, deferred drain reset, and zero-allocation full reset. Please make two small updates after #28 and #111:
|
- Keep Punch::new(rate, config.punch) in Processor::new. - Load CorrectionConfig::notes for self.rate in Resynthesis::reset. - Keep Formant::generation unchanged in Formant::reset. - Update the drain and reset documentation for Wasm and Rust.
|
Merged
|
|
Round 2 review: Reset equivalence, -60 dBFS reverb tail calibration, deferred drain reset, and #28/#111 alignment all look solid. Two items before merge:
|
- Align AllNotesOff in src/scale.rs with keys 0..=127. - Release harmony MIDI notes when HarmonyConfig::source changes. - Reset the write cursor of the fixed DelayLine ring to zero. - Keep the ControlActivity queries and the formant envelope cache.
- Wrap the drain reset label onto two tspan lines at x=570.
|
Merged
|
- Keep scale and dwell resets in Resynthesis::reset_audio - Align beginDrain and drainMono docs in src/wasm.rs with main
|
Review: The Because full RNG/filter
|
- Merge main into the drain budget and reset branch. - Keep Formant::aspiration_muted in Processor::drain_into. - Keep the stage diff-guards in Reverb and HarmonyState. - Defer the drain reset to the next non-empty zero-frame call. - Clear all filter, MIDI and random states in Processor::reset.
|
Addressed in
|
Summary
reverb::tail_framesfromreverb_layouttap distances and a-60 dBFS(1e-3) decay threshold across all sixReverbModevariants, with separate outer comb loop and short allpass section budgets.self.reset()at the end of a drain inProcessor::drain_intoto the next non-empty zero-frame drain call while keeping#61'sFormant::aspiration_mutedflag, so the final positive tail block keepsFeedbackandTelemetrypeaks andprocessed_framesand empty buffers do not finish the drain.HarmonyState::resetwhileMidiEvent::AllNotesOffandHarmonyConfig::sourcechanges keep live release envelopes throughHarmonyState::release_all_notes, and preserve#61's stage field-diff guards inReverbandHarmonyState.CorrectionTable::resetandMidiEvent::AllNotesOffinsrc/scale.rswith#46's0..=127key coverage and reloadCorrectionConfig::notesforself.rate, and cleardrift,harmony_gains,modulation_phase,scale_indexandoctavewithcontrol_counter = CONTROL_DUEinResynthesis::reset_audio.delay.write,lpf1andlpf2inReverb::reseton#86's fixed delay ring, clearprevious_periodand correlations inPitchTracker::reset, keepFormant::generationmonotonic acrossFormant::reset, and buildNumericContextagain fromrandom_seedinProcessor::resetwith zero memory allocations.src/lib.rs,src/processor.rs,src/wasm.rs,README.mdanddocs/images/lifecycle.svgin ASD-STE100 English.BREAKING CHANGE:
resetnow clears all filter, controller andrandom_seedstates so the processor matchesnewwithout allocation, anddrain*methods defer the completion reset to the next non-empty call that returns0so the final positive tail block keeps itsFeedbackandTelemetrypeaks and frame count.Verification
cargo fmt --checkcargo clippy --locked --lib -- -D warningsRUSTFLAGS="-D warnings" cargo build --locked --releaseRUSTDOCFLAGS="-D warnings" cargo doc --locked --no-depscargo package --lockednpm ci && RUSTDOCFLAGS="-D warnings" npm run check:wasm && npm run verify:pack && npm run verify:pack -- --ignore-scriptscargo +1.88 build --locked --libandcargo +1.88 build --locked --lib --target wasm32-unknown-unknown --features wasmreverb::tail_framesbudgets (Binaural=5,926frames,Schroederatdecay = 0.0=102,208frames,LargeHalldefault =249,224frames and maximum =2,459,348frames) and-60 dBFSimpulse decay retention across all sixReverbModevariants.#61Formant::aspiration_mutedpreservation and next-call reset acrossdrain,drain_planar,drain_mono,drain_f32,drain_planar_f32,drain_mono_f32and WebAssemblyTuneletdrain methods.Processor::reset(and post-drain reset afterParameterControlupdates) andProcessor::newwith zero post-construction heap allocations,0..=127correction key coverage onAllNotesOffandreset,#104Telemetrypitch fields andFloat32Arrayvoice slices, and monotonicTelemetry::formant_generationacross resets.Automated PR initiated by user @byteland-app via Stitch Loop.