Repository navigation
fix: restore the initial state on reset without memory allocation - #106
Closed
google-labs-stitch[bot] wants to merge 1 commit into
Closed
google-labs-stitch[bot] wants to merge 1 commit into
google-labs-stitch[bot] wants to merge 1 commit into
Conversation
- Reload the configured correction scale in CorrectionTable::reset - Clear the harmony envelopes and caches in HarmonyState::reset - Clear the resynthesis controllers in Resynthesis::reset - Clear PitchTracker::previous_period and best on a full reset - Restore NumericContext in Processor::reset - Clear the reverb filters and write cursor in Reverb::reset - Restore the initial base drive in Punch::reset - Update the reset documentation in README.md and rustdoc
Contributor
byteland-app
deleted the
stitch/restore-processor-reset-state-jm1-12999e08-54db-438d-b7eb-78e9824377f9
branch
November 25, 2026 08:04
Contributor
Author
|
Acknowledged — leaving #106 closed in favor of #75 (which covers both zero-allocation reset and calibrated reverb tail budgets). For completeness on this branch (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores the exact post-
Processor::newstate in place with zero heap allocation acrossProcessor::reset,ControlEvent::Reset,draincompletion, andWasmProcessor::reset(Tunelet.reset()), while keeping mid-streamMidiEvent::AllNotesOff,HarmonyConfig::sourcechanges,stereo_outputswitches, andTelemetry::formant_generationunchanged.Changes
src/scale.rs,src/resynthesis.rs): SplitCorrectionTable::release_keysforMidiEvent::AllNotesOff(preserving key127) and updateCorrectionTable::resetto clear all128keys and reloadCorrectionConfig::noteswith the periods for the prepared sample rate (#28).src/harmony.rs,src/resynthesis.rs): Move mid-stream MIDI release intoHarmonyState::release_notesforAllNotesOff, source switches, andstereo_outputswitches; restoresmoothed_gain,period_output,target_period,current_ratio, MIDI slots, chord state, and scale caches inHarmonyState::reset; cleardrift,harmony_gains,modulation_phase,scale_index, andoctave, and setcontrol_countertoCONTROL_DUEinResynthesis::reset.src/pitch/tracker.rs,src/numeric.rs,src/numeric/rng.rs,src/effects/reverb.rs,src/effects/punch.rs,src/processor.rs): Clearprevious_periodandbeston full tracker reset while keepingPitchTracker::reset_audiofor stereo switches; addNumericContext::resetto resetAtanQ14::indexto1and reseedRandomStreamfromrandom_seed as u32; keepReverb::reset_delayfor stereo switches and resetDelayLine::write,lpf1, andlpf2unconditionally inReverb::reset; keepPunch::newandPunch::resetinitializingdrivefromgain_db(BASE_DRIVE.mul(self.gain),#111).README.md,src/lib.rs,src/processor.rs,src/events.rs,src/wasm.rs): Update lifecycle and API documentation in ASD-STE100.Verification
cargo fmt --checkcargo clippy --locked --lib -- -D warningscargo build --locked --releaseRUSTDOCFLAGS="-D warnings" cargo doc --locked --no-depscargo package --list --lockedRUSTDOCFLAGS="-D warnings" npm run check:wasmnpm run verify:pack0heap allocations acrossProcessor::reset,ControlEvent::Reset, anddraincompletion, and sample-exact PCM,Feedback,Telemetry, andformant_envelopeparity againstProcessor::newacross Rust and WebAssembly at 44.1 kHz and 48 kHz.Automated PR initiated by user @byteland-app via Stitch Loop.