Skip to content

feat: add partial configuration updates and scalar events - #66

Closed
google-labs-stitch[bot] wants to merge 3 commits into
mainfrom
stitch/partial-config-and-scalar-events-jm1-55928a1b-b129-4260-becd-dd4139e61859
Closed

google-labs-stitch[bot] wants to merge 3 commits into
mainfrom
stitch/partial-config-and-scalar-events-jm1-55928a1b-b129-4260-becd-dd4139e61859

Conversation

@google-labs-stitch

Copy link
Copy Markdown
Contributor

Summary

This change adds partial configuration updates and scalar automation events across the Rust, WebAssembly and TypeScript APIs.

  • Add Processor::update_config so Rust callers copy self.config, edit fields and apply set_config atomically without heap allocation.
  • Add serde default deserialization for ProcessorConfig, ResynthesisConfig, CorrectionConfig, PitchConfig, FormantConfig, HarmonyConfig and all four effect configuration structs while config() and defaultConfig() still return complete ProcessorConfig types.
  • Export DeepPartial<T> from src/wasm.rs and src/index.ts, accept DeepPartial<ProcessorConfig> in new Tunelet(...) and add Tunelet.updateConfig(patch).
  • Preserve active values in updateConfig when fields are absent or undefined, replace fixed-size arrays atomically and throw a JavaScript Error on null, wrong types or invalid ranges before processor state or an active drain changes.
  • Add ControlEvent::RetuneMs, ControlEvent::PitchRatio, ControlEvent::FormantShift, ControlEvent::DryMix and ControlEvent::ReverbMix with range validation and zero-allocation updates in Processor::apply.
  • Update rustdoc and README.md in ASD-STE100 Simplified Technical English.

Verification

  • Ran cargo build --locked --release, cargo fmt --check, cargo clippy --locked --lib -- -D warnings and cargo doc --locked --no-deps.
  • Ran cargo clippy and cargo doc for wasm32-unknown-unknown --features wasm and ran npm run build (wasm-pack and tsc).
  • Verified zero default Cargo dependencies (cargo tree --locked) and kept test = false in Cargo.toml.
  • Verified sample-exact stereo PCM across multi-block processing and drain against a pre-change fixed-point baseline, and verified bit-for-bit equivalence between the new scalar ControlEvent variants and full-stage events in Rust and Wasm.

Automated PR initiated by user @byteland-app via Stitch Loop.

- Add Processor::update_config for atomic configuration updates.
- Add serde default deserialization for all configuration structs.
- Export the DeepPartial type from the Wasm and TypeScript APIs.
- Accept partial configurations in Tunelet and updateConfig.
- Add RetuneMs, PitchRatio, FormantShift, DryMix and ReverbMix events.
- Document the new APIs and scalar events in rustdoc and README.md.
- Keep the asynchronous Wasm import in src/index.ts.
- Keep the DeepPartial type export in src/index.ts.
- Include the v0.3.1 release, CI workflows and formant updates.
- Keep the partial configuration updates and scalar control events.
@byteland-app

Copy link
Copy Markdown
Contributor

Closing as superseded by #122 (partial config patches) and #61 (scalar parameter events). Adding serde(default) mirror structs weakens setConfig() missing-field validation, and the manual 50-field Reflect::get merger is slower and harder to maintain than #122.

@byteland-app
byteland-app deleted the stitch/partial-config-and-scalar-events-jm1-55928a1b-b129-4260-becd-dd4139e61859 branch November 25, 2026 08:05
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Acknowledged. This pull request stays closed because #122 and #61 supersede it. #122 adds partial configuration patches without serde(default) mirror structures on setConfig() or manual Reflect::get merges, and #61 adds scalar ParameterControl events. No further changes were made to this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant