Repository navigation
feat(wasm): add packed binary MIDI methods and buffers - #109
google-labs-stitch[bot] wants to merge 6 commits into
Conversation
- Add EventProblem::MidiBus for unknown packed MIDI bus values - Add and export PackedMidiEvent for three-byte MIDI messages - Add zero-allocation packed MIDI methods on Processor - Reuse TimedEvent and u32 MIDI buffers in WasmProcessor - Add processWithMidi and processMonoWithMidi for Uint32Array - Check packed MIDI methods and types in scripts/verify-pack.mjs - Document the packed MIDI format and buffer reuse in README.md
- Merge origin/main into the feature branch - Pass OutputLayout to Processor::next in packed MIDI methods - Unify WasmProcessor::events with the cached-key JS event decoder - Validate packed MIDI words before the input PCM copy - Update the allocation documentation in src/lib.rs and README.md
- Name ValidatedPackedMidi in the ValidatedEvent rustdoc - Keep the articles in the packed MIDI comments in src/wasm.rs - Keep the articles in the packed MIDI section of README.md
|
Updated the branch onto latest
|
- Merge origin/main into the feature branch - Keep ControlActivity and PackedMidiEvent in src/processor.rs - Keep EnvelopeKey and ValidatedPackedMidi in src/wasm.rs - Check the packed MIDI methods in the four TypeScript profiles - Keep the packed MIDI and ControlActivity sections in README.md
|
Updated the branch onto latest
|
- Keep f32 process and drain methods with packed MIDI methods - Keep Float32 views and pointers with the u32 MIDI buffer - Normalize JSDoc ranges and throws tags for packed MIDI methods - Check packed MIDI runtime, types and JSDoc in verify-pack.mjs - Update README and crate docs for f32 audio and packed MIDI
|
Updated the branch onto latest
|
|
Review: Native zero-allocation packed MIDI and reusable Wasm Please sync onto updated |
- Re-export PackedMidiEvent alongside ParameterControl in src/lib.rs - Keep packed MIDI methods with ParameterControl in src/processor.rs - Keep Uint32Array MIDI decode with cached parameter keys in src/wasm.rs - Check packed MIDI and ParameterControl together in verify-pack.mjs - Keep packed MIDI docs with the scalar parameter table in README.md
|
Synced onto latest
|
Summary
EventProblem::MidiBusinsrc/error.rsto report unknown packed MIDI bus selectors.PackedMidiEventinsrc/events.rsandsrc/lib.rsto pair a zero-based frameoffsetwithbus(0forMidi,1forCorrectionMidi) and three MIDI bytes.process_with_midi,process_planar_with_midiandprocess_mono_in_place_with_midimethods onProcessorinsrc/processor.rsalongside thef32process and drain methods (feat: expose Float32 buffers in Wasm for in-place audio #117), backed byMidiEvent::from_bytesand matchingOutputLayout::StereoandOutputLayout::Mono(fix: align dry delay, stereo reverb and mono meters #21).WasmProcessorinsrc/wasm.rswith perf(wasm): decode JS events into a reusable buffer #99's cached-key fast JS event decoder (EventKeysanddecode_events), perf(formant): fuse envelope rotations and cache Wasm results #30's formant envelope cache, feat: expose Float32 buffers in Wasm for in-place audio #117's fixed-capacityf32buffers and pointers (TuneletAudioViews), and feat: add control activity queries #135'scontrolActivity(), while adding a reusablemidi_words: Vec<u32>buffer grown withtry_reserve_exact.Tunelet.processWithMidiandTunelet.processMonoWithMidiinsrc/wasm.rs(re-exported viasrc/index.tsand normalized via fix(npm): normalize JSDoc comments at the package boundary #107'sscripts/normalize-jsdoc.mjs) to copy and validate(offset, packedMessage)word pairs fromUint32Arrayin onecopy_tocall before copying input PCM.scripts/verify-pack.mjsruntime, TypeScript profile (fix(wasm): sanitize TypeScript declarations and Wasm exports #123), and normalized JSDoc@throws(fix(npm): normalize JSDoc comments at the package boundary #107) checks across bothtuneletand@bytelandtechnology/tuneletarchives, and document the packed binary MIDI format, ranges, view detachment rules, and allocation rules in rustdoc andREADME.md.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, and MSRV1.88checks with zero warnings.0native heap allocations with a counting global allocator and0post-warm-up Wasm linear memory growth across 1,000 interleavedTimedEvent[]andUint32Arrayblocks, plusTuneletAudioViewsrebinding on initialmidi_wordsWasm memory growth.Feedback,ControlActivity,Telemetry(including fix: align dry delay, stereo reverb and mono meters #21 post-downmix mono peaks), andformantEnvelope(perf(formant): fuse envelope rotations and cache Wasm results #30) agreement with perf(wasm): decode JS events into a reusable buffer #99'sTimedEvent[]decoder (including feat(resynthesis): add humanize and flex-tune controls #45humanizeandflexTune) acrossNoteOn, zero-velocityNoteOn,NoteOff, controller123(AllNotesOff) and ignored valid three-byte messages (Ok(None)), for both harmony and correction MIDI.Uint32Arraylengths, unknown bus values, status bytes below0x80, data bytes above127and invalid offsets.Wasm Boundary Traces and 128-Frame Harmony Benchmarks (48 kHz, Post-#99
main)NoteOn)0.3.2TimedEvent[]Calls#99TimedEvent[]CallsprocessWithMidiCalls#99TimedEvent[](µs / 128f)processWithMidi(µs / 128f)+2over 0-event)+2over 0-event)+2over 0-event)+2over 0-event)+2over 0-event)Automated PR initiated by user @byteland-app via Stitch Loop.