Repository navigation
feat!: add pitch fields to Telemetry and trim Wasm voice slices - #104
Conversation
- Add the five Feedback pitch fields to Telemetry - Populate the pitch fields in Processor::telemetry - Add active_voice_ratios and active_voice_gains on Telemetry - Serialize active Wasm voices into Float32Array slices - Type voiceRatios and voiceGains as Float32Array in TypeScript - Update the telemetry rustdoc and README.md
|
Review: High-value change — unifying pitch fields into Telemetry and trimming Wasm voice slices to Float32Array cuts Telemetry overhead ~2.8x and avoids redundant feedback() calls in downstream apps. Target this for the 0.4.0 breaking window, and please add #[non_exhaustive] to Telemetry while making this breaking change so future telemetry fields are non-breaking. |
- Merge main at 0.3.3 into the feature branch - Keep Object and Reflect imports in src/wasm.rs - Combine pitch and mono peak notes in src/lib.rs - Combine voice slice and mono peak notes in README.md
- Add #[non_exhaustive] to Telemetry in src/processor.rs
|
Added |
- Merge main at 0.3.4 into the feature branch - Keep ControlActivity and Telemetry in src/wasm.rs - Combine ControlActivity and Telemetry notes in src/lib.rs - Combine ControlActivity and voice slice notes in README.md
|
Merged updated
|
|
Round 3 review: Approved for 0.4.0 — Telemetry #[non_exhaustive], pitch fields, and trimmed Float32Array voice slices are verified. Please rebase onto updated main after #107 (adding normalize-jsdoc.mjs mappings for the new Telemetry rustdoc links). |
- Merge main into the feature branch - Map the five Telemetry rustdoc links in normalize-jsdoc.mjs - Remove the Default prose line of Telemetry in normalize-jsdoc.mjs - Check Telemetry JSDoc and Float32Array types in verify-pack.mjs
|
Synced with updated
|
Summary
resample_ratio,period_samples,frequency_hz,target_midi_noteandvoicedfromFeedbacktoTelemetryand populate them inProcessor::telemetry.Telemetrywith#[non_exhaustive]so future telemetry fields are non-breaking after the0.4.0release.Telemetryin Rust soTelemetrystaysCopywithout heap allocation, and addTelemetry::active_voice_ratiosandTelemetry::active_voice_gainsslice methods.Telemetryinsrc/wasm.rsto copy only0..voice_countactive entries intoFloat32Arrayvalues viaFloat32Array::new_with_lengthandFloat32Array::copy_from, and preserveserde::Serializeandserde::Deserializeparity onwasm32.tsifyannotations onTelemetryso TypeScript declarations exportvoiceRatiosandvoiceGainsasFloat32Array.Telemetryintra-doc links andDefaultprose note inscripts/normalize-jsdoc.mjsand checkTelemetryJSDoc andFloat32Arraydeclarations inscripts/verify-pack.mjs.README.mdin ASD-STE100 Simplified Technical English, and keepProcessor::feedback,Processor::take_feedbackand rendered fixed-point PCM unchanged.Verification
cargo fmt --check,cargo clippy --locked --lib -- -D warnings,cargo build --locked --release,RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps,cargo package --locked,RUSTDOCFLAGS="-D warnings" npm run check:wasm,npm run verify:pack,npm run verify:pack -- --ignore-scriptsand MSRV1.88host +wasm32checks.f32output at 44.1 kHz and 48 kHz againstmainacross Choir, Harmony,humanize/flex_tune, Punch, Warm, Formant, Alien, Reverb and drain cycles.Processor::telemetryandTunelet.prototype.telemetrymatchFeedbackon all five pitch fields, keep independent peak windows and returnFloat32Arrayslices of lengthvoiceCount(1in default Choir,5in Harmony,16in 16-voice Choir).voiceCount === 1:__wbg_set_bea140a88be9b277drops from34to2(outputPeakonly),__wbg_*calls drop from52to29(31vs96including cast intrinsics;31vs119for single-calltakeEngineReport),takeTelemetry()drops from4.55 us/callto1.64 us/calland 50 Hz engine report reads drop from6.14 us/callto1.78 us/call.Automated PR initiated by user @byteland-app via Stitch Loop.