The pieces / weirdnet-audio-record

weirdnet-audio-recordnew

Recording for audio: stems, device outputs and a mix from streams, latency records, take manifests with per-source offsets, gap handling, alignment and re-alignment on export.

v0.3.0 GitHub crates.io docs.rs weirdnet-audio-record = "0.3.0"

What it is

Version 0.3 takes its stream types from weirdnet-streaming.

Key types and modules

  • Stems (StemRecorder): audio placed by its position on the session clock, from raw samples or raw PCM stream frames. Missing audio becomes silence and is noted as a gap; audio that arrives twice is ignored.
  • Takes (Take): sources of three kinds (a stem, a device output, a recorded mix), each with a latency record, an offset computed from it, a manual trim and an optional group that pairs a source’s stem with its device output.
  • Alignment: aligned shifts each source by its offset and cuts all of them to the same range; render_mix sums the stems; change a trim and export again to re-align. estimate_offset finds the lag of a delayed copy of a test signal by cross-correlation.
  • Files: write saves the raw sources, the rendered mix.wav and manifest.json; load reads them back; export_aligned writes aligned sources.

Usage

[dependencies]
weirdnet-audio-record = "0.3.0"

Where it fits

Version 0.3.0 is on crates.io (docs.rs, repository).