Skip to content

feat: align dry tap and add global mix, bypass and Alien mix - #100

Closed
google-labs-stitch[bot] wants to merge 1 commit into
mainfrom
stitch/align-dry-tap-global-mix-bypass-jm0-67c34580-d344-45b3-adc9-a794b2467dda
Closed

google-labs-stitch[bot] wants to merge 1 commit into
mainfrom
stitch/align-dry-tap-global-mix-bypass-jm0-67c34580-d344-45b3-adc9-a794b2467dda

Conversation

@google-labs-stitch

Copy link
Copy Markdown
Contributor

Summary

  • Read dry in src/resynthesis.rs from self.raw at LATENCY_FRAMES (1,593 frames) while keeping OVERLAP_FRAMES (1,543 frames) for period lookup.
  • Add mix (0.0..=1.0, default 1.0) to AlienConfig and blend direct and boundary-faded reversed stereo frames in Q14.
  • Add global mix (0.0..=1.0, default 1.0) and bypass (bool, default false) to ProcessorConfig.
  • Delay the raw input before Punch by 1,593 frames in Processor for global mix and direct bypass (-32767..=32767 PCM clip), and clear the dry buffer in Processor::reset.
  • Mark mix, bypass, and alien.mix optional with serde defaults and tsify(optional) for wasm32, and update the documentation.

Verification

Dry tap alignment and comb response verification

  • Impulse alignment: Impulse responses across resynthesis.dry_mix (0.0..=1.0), global mix (0.0..=1.0), and bypass = true emit one impulse at frame 1,593 (0 frames offset) at 44.1 kHz and 48 kHz.
  • Comb notch removal: Unshifted tones across 220 Hz..882 Hz (440 Hz, 441 Hz, and 480 Hz included) measure 0.00 dB comb loss at dry_mix = 0.5 and global mix = 0.5 (-72.98 dB notch removed).
  • Bit-exact default output: Seven deterministic v0.3.2 PCM renders across 44.1 kHz and 48 kHz produce identical FNV-1a digests at default mix = 1.0 and bypass = false.
  • Real-time and validation rules: Verified 0 heap allocations after Processor::new, -32768 clipping to -32767 in bypass, Processor::reset dry buffer clearing, and Error::InvalidConfig / Error::InvalidEvent preflight rejection when alien.enabled is false or bypass is true.
  • CI checks: Passed cargo fmt --check, native and wasm32 cargo clippy -- -D warnings, native and wasm32 RUSTDOCFLAGS="-D warnings" cargo doc, cargo package --list --locked, and npm run verify:pack.

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

- Read the resynthesis dry tap at the 1,593-frame latency
- Blend direct and reversed stereo frames with AlienConfig::mix in Q14
- Add global mix and bypass controls to ProcessorConfig
- Delay the input before Punch by 1,593 frames for mix and bypass
- Clear the processor dry buffer in Processor::reset
- Make the new configuration fields optional in WebAssembly
- Document the 1,593-frame dry delay and the new controls
@byteland-app

Copy link
Copy Markdown
Contributor

Closing as superseded by #116. #116 adds smooth 200-frame click-free Q14 bypass crossfades and parallel mix across Punch, Warm, Alien, and Processor, whereas #100 hard-switches bypass (causing audible clicks) and omits Punch/Warm mix.

@byteland-app
byteland-app deleted the stitch/align-dry-tap-global-mix-bypass-jm0-67c34580-d344-45b3-adc9-a794b2467dda branch November 25, 2026 08:04
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