Skip to main content

Crate weirdnet_audio_record

Crate weirdnet_audio_record 

Source
Expand description

Recording for Weirdnet audio: stems, device outputs and a mix, with latency records and take manifests.

  • A StemRecorder places incoming audio by position on the session clock, fills gaps with silence and notes them, and ignores audio that arrives twice.
  • A Take holds the stems of one recording with a Manifest: per source its kind (stem, device output, mix), where it starts, its latency record, the offset computed from it and a manual trim.
  • Take::aligned cuts every source to the take’s range, shifted by its offset, so all sources have equal length; mix sums them. Changing a trim and exporting again re-aligns.
  • estimate_offset finds the lag between a reference and a delayed copy, for measuring latency from a test signal.
  • wav writes and reads 32-bit float WAV; Take::write writes stems, the mix and manifest.json to a folder.

Modules§

wav
32-bit float WAV files.

Structs§

Gap
Missing audio, filled with silence.
LatencyRecord
What a port adds to the path, with its quality and how it was found.
Manifest
The take’s description, saved as manifest.json.
SourceEntry
One source in the manifest.
Stem
A recorded source: interleaved samples starting at a session position.
StemRecorder
Builds a Stem from audio that arrives in blocks.
Take
One recording: sources and their manifest.

Enums§

LatencyQuality
How a latency figure was obtained.
RecordError
Why a take operation failed.
SourceKind
What a source is.

Functions§

estimate_offset
The lag, in frames from -max_lag to max_lag, at which mono signal best matches mono reference (a positive lag: the signal is late). Uses plain cross-correlation, so give it a test signal with a clear shape (a click or noise burst), not a steady tone.
mix
Sum equal-shaped interleaved buffers with a linear gain each. The result is as long as the longest input.