Repository navigation
feat(resynthesis): split vibrato from the mean pitch contour - #57
google-labs-stitch[bot] wants to merge 8 commits into
Conversation
- Add vibrato_preserve to CorrectionConfig with a default of zero. - Validate vibrato_preserve in 0..=1 before state changes. - Accept an absent vibratoPreserve field in JavaScript. - Add a Q24 period filter at the five-frame update cadence. - Select correction targets from the secular Q6 period. - Apply the vibrato modulation ratio to the smoothed secular ratio. - Seed the period filter at acquisition. - Clear the period filter on a restart and on an audio reset. - Skip the period filter at zero to keep exact v0.2.0 output. - Document vibrato_preserve in rustdoc, wasm and the README.
- Merge the latest main branch into the feature branch. - Keep the widened i64 fixed-point comparisons in target selection. - Update the correction comments for Q14 quantization.
- Merge the latest main branch into the feature branch. - Keep the vibrato contour filter and correction configuration.
- Merge the latest main branch into the feature branch. - Keep the vibrato contour filter and correction configuration.
|
Review: Approved in principle — the Q24 + i128 error-feedback vibrato/secular pitch contour split is mathematically solid, zero-allocation, and bit-exact when vibrato_preserve == 0.0. Please rebase onto updated main (minor conflict with #3 in src/resynthesis.rs) and squash the merge commits. |
- Merge the latest main branch into the feature branch. - Return None in select_target_ratio if a shifted period wraps. - Keep the vibrato contour filter and correction configuration.
|
Updated
Note: Force-pushing is disabled in this automated sandbox environment ( |
|
Integrated updated
Note: Because force-pushing is disabled in this sandbox environment ( |
|
Round 3 review: Approved — Q24 + i128 vibrato contour split is bit-exact at 0.0 and cleanly structured. Please rebase onto updated main after #45 (integrating vibrato_preserve alongside humanize/flex_tune in CorrectionConfig and select_target_ratio). |
- Share deserialize_zero_f32 for vibrato_preserve in CorrectionConfig. - Pass the humanize decay from select_target_ratio to vibrato updates. - Document humanize, flexTune and vibratoPreserve in wasm and README. - Check absent and undefined correction fields in verify-pack.mjs.
|
Integrated updated
Here is an ASD-STE100 commit message verified against |
|
Review: Q24 + Please sync onto updated |
|
Synced onto
Verified bit-exact PCM output at Updated squash commit message (verified with |
Summary
vibrato_preserve: f32(0.0..=1.0, default0.0) toCorrectionConfigwithserde(default, deserialize_with = "deserialize_zero_f32")andtsify(optional, type = "number | undefined")so absent orundefinedvibratoPreservevalues decode to0underexactOptionalPropertyTypes.resynthesis.correction.vibrato_preservein0.0..=1.0insideCorrectionConfig::validatebefore state or output changes across native and Wasm calls, and guardconfigure_vibrato_preserveinsideResynthesis::apply_configso unchanged configurations leave contour state untouched.PeriodFilter(src/resynthesis/vibrato.rs), aQ24contour filter configured once at construction for the 5-frame tracking cadence (rate / 5) that separates the secular period (-3 dBcutoff~2.38 Hz <= 3 Hz, group delay~77 ms < 80 ms) from the4..=8 Hzvibrato band without heap allocation after construction or floating-point math inprocess_sample.CorrectionTabletargets (includinghumanizedwell decay andflex_tuneouter soft zones) from the secularQ6period, taper the vibrato modulation ratio by theflex_tunepull (Q14::ONE + pull.mul(mod_ratio - Q14::ONE)) sovibrato_preserve > 0stays continuous with0.0at bin midpoints, smooth both ratios with the active correction decay, and keepLATENCY_FRAMESat1,593.reset_audio, and bypass the filter and ratio product whenvibrato_preserve == 0.0to keepQ14wrap order bit-identical tomain.vibrato_preserveand optionalvibratoPreservein ASD-STE100 Simplified Technical English across rustdoc,src/wasm.rs, andREADME.md, and verify optionalvibratoPreserveinscripts/verify-pack.mjs.Verification
i16PCM output at44.1 kHzand48 kHzwithvibrato_preserve = 0.0againstmain(8880205) across Choir, Harmony, Formant, Punch, Warm, Reverb,ParameterControl, MIDI, and drain paths.flex_tunecontinuity & diff-guards:5.5 Hz,100-cent p-p vibrato (+30cents mean) on Chromatic scale atretune_ms = 0.0:vibrato_preserve = 1.0retains99.9%depth (> 85%) andvibrato_preserve = 0.5retains49.8%depth with0chromatic bin jumps (target_midi_noteconstant on A3).4.0 Hz,5.5 Hz, and8.0 Hzvibrato at120cents p-p (+30cents mean) on Chromatic scale atretune_ms = 0.0and5.0: retains88.8%..100.9%depth (>= 85%) at both44.1 kHzand48 kHzwith0bin jumps.flex_tune = 1.0,vibrato_preserve = 0.01tapersmod_ratiobypulland retains natural vibrato without jumping discontinuously relative to0.0.set_configcalls with unchangedvibrato_preserveproduce bit-identical PCM output via theResynthesis::apply_configdiff-guard.defaultConfig()emitsvibratoPreserve: 0, omitted orundefinedvibratoPreservedefaults to0, JSDoc normalization (scripts/normalize-jsdoc.mjs) and all four strictexactOptionalPropertyTypesTypeScript profiles inscripts/verify-pack.mjspass, and invalid values throwErrorbefore state or buffer changes.cargo fmt --check,cargo rustc --locked --lib --release -- -D warnings,RUSTFLAGS="-D warnings" cargo build --locked --release,cargo clippy --locked --lib -- -D warnings,RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps,cargo package --locked,npm run check:wasm,npm run verify:pack,.githooks, and MSRV1.88pass without warnings.