Repository navigation
fix!: crossfade voice cursors and ramp live stage changes - #74
google-labs-stitch[bot] wants to merge 14 commits into
Conversation
- Crossfade period wraps and cursor jumps across all 16 voices. - Silence secondary Choir voices until fresh lead frames arrive. - Backfill the formant history when the formant stage becomes active. - Crossfade delayed raw audio with LPC output after the overlap delay. - Ramp the Q14 pan weights over 256 frames on stereo switches. - Capture a fresh Alien loop before the 200-frame wet ramp. - Ramp the Alien wet mix over 200 frames on each toggle. - Set the Alien boundary fade to zero for a one-frame loop. - Ramp the reverb wet gain over 256 frames across mode switches. - Clear the reverb delay buffer and filters between modes. - Feed zero input into the reverb until a bypass tail finishes. - Include active transition and bypass tails in tail_frames. - Update README.md for the continuous stereo_output behavior.
- Merge the latest main commits into the feature branch. - Resolve the conflicts in reverb.rs and resynthesis.rs. - Use Q14.abs and i64 mono sums in Reverb. - Ramp mono harmony_gain with stereo_fade in Resynthesis.
- Merge the latest main commits into the feature branch. - Resolve the conflicts in processor.rs and resynthesis.rs. - Keep the stereo_output pan ramps without a stage reset. - Share the reader limits across the harmony slots in Resynthesis. - Skip the history interpolation for silent harmony voices.
- Merge the latest main commits into the feature branch. - Resolve the conflict in src/resynthesis.rs. - Update the two active position slices in process_sample.
|
Review: Much better architecture than #54 (zero extra large delay buffers, zero idle LPC CPU burn, proper Alien capture handling, and Reverb bypass tail accounting). Please rework onto updated main (currently conflicting with 7eee352, 1668f6f, 7490b83, and #21/#111/#126):
|
- Merge the latest main commits into the feature branch. - Keep the dirty-span resets in Alien, Reverb, Formant and Resynthesis. - Share one network evaluation in Reverb with stereo dry and wet peaks. - Fill the reverse formant history and mirror tail on stage enable.
During formant transitions, the raw fallback path bypassed the anti-alias filters, and `Formant::add_noise` stopped aspiration on frame zero of disable. - Apply the `post` anti-alias filters to delayed `raw` taps during formant transitions. - Wait for settled `post` filter states before a reader returns to `filtered`. - Keep aspiration active until `formant_fade` decreases to zero.
|
Merged
|
|
Round 2 review: Thank you for preserving #21/#111/#126 and dirty-span resets, and for ramping aspiration on formant disable. Two technical bugs still block merge:
|
- Keep the fixed-array delay ring and FIR sum in reverb - Keep single-channel synthesis when voice pan is off - Keep shared ring helpers, envelope cache and control activity
- Filter delayed raw input through persistent biquads - Read raw transition taps without per-lookup warmups - Pause the raw filter path when formants settle off
- Track per-slot LPC state and raw lookahead in the overlap ring - Step the formant fade smoothly without single-frame resets - Keep active model banks intact when formants turn on again
- Document transition ramps and bypass tails in tail_frames - Update the Wasm tailFrames documentation and README table
|
Merged
|
- Keep the Stamp and HISTORY helpers in src/formant.rs - Keep the 16-voice crossfades in Resynthesis::move_choir_reader - Use Resynthesis::apply_glottal in the formant transitions - Keep the f32 drain methods and tail_frames documentation - Keep the Float32 API rows and tailFrames label in README.md
|
Review (local verification):
|
- Merge upstream main at 8880205 into the transition ramp branch. - Combine diff-guarded stage setters and parameter events with ramps. - Keep smooth choir delay crossfades and voice cursor initialization. - Preserve pitch telemetry fields without stereo output resets.
- Hold active_loop_len constant while wet_frames is above zero. - Ramp active wet playback to zero before a new loop length applies. - Count post-enable input during loop-length fades without stale reads. - Update AlienConfig and Telemetry loop documentation.
- Update reverb_wet_peak while an active bypass tail renders audio. - Ramp network input to zero over 256 frames when reverb disables. - Include the input ramp in bypass_remaining before zero-input decay. - Update ReverbConfig, Processor and Telemetry documentation.
|
Addressed all three items and merged
|
Summary
This change adds local
Q14stage ramps, validity counters, and 16-voice cursor crossfades so live parameter updates make smooth audio transitions without heap allocations after construction. The!mark targets the0.4.0release window because multi-voice period wraps, live stage transitions, andtail_framestransition budgets change output samples relative to0.3.x.ChoirandHarmonyvoices (including#61ParameterControl::ChoirVoicesandParameterControl::ChoirDelayupdates), and silence secondaryChoirreaders until fresh frames fromrender_leadarrive.491pre-emphasized samples whenformant.enabledbecomestrue, maintain a persistentraw_filteredhistory for anti-aliased transition taps, track per-slot LPC state inoverlap_lpcwith a 256-framelookahead_rawwindow, and stepformant_fadeover256frames without single-frame jumps on rapid toggles.resynthesis.stereo_outputupdates, copy channel zero formant state, rampQ14pan weights over256frames, and keep#102mono fast paths and#104Telemetrypitch reporting.Alienwithout buffer clears, holdactive_loop_lenconstant across200-frame wet fade-outs before applying new loop lengths, and set the boundary fade length to0atloop_framesof1andmin(200, loop_frames / 2)for longer loops.#86,#21, and#61reverb topologies and narrow setters, ramp the reverb wet gain over256frames acrossReverbModeswitches, ramp the network input to zero over256frames on disable before bypass tails decay and clear, keepreverb_wet_peakactive during bypass tails, and document active transition and bypass budgets inProcessor::tail_framesandtailFrames.Verification
cargo fmt --check,cargo clippy --locked --lib -- -D warnings,RUSTFLAGS="-D warnings" cargo build --locked --release,RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps,cargo package --locked,npm run check:wasm,npm run verify:pack, and MSRV1.88native andwasm32builds.2,666.7us budget at48kHz, 5Harmonyvoices with crossfades atpitch_ratio = 2.0):37.0us steady median,144.2us transition p95, and208.0us max.formant.enableddouble-toggles (true -> false -> trueacross1..=950frame gaps),Alienmid-playbackloop_framesgrow/shrink transitions (max_abs = 0on zero input after pre-enable history), andReverbEchodisable input ramps (max |delta| = 64PCM counts across the+4,000-frame tap) and active bypassreverb_wet_peak.ParameterControlequivalence against stageControlEvents and bit-exact steady-state PCM and telemetry parity againstmain(8880205), with0post-construction heap bytes.