Expand description
Sound rendering for the SIM music constellation.
This crate turns synthesized Tones into
interleaved PCM audio. PcmRenderer renders single tones and mixes
scheduled tones with per-tone timing and panning, and encodes the result as
16-bit WAV; RendererOptions configures the sample rate and channel
count. It also composes the existing STFT and numbers-signal owners for
policy-complete offline phase vocoding, and reports EBU R128 / ITU-R
BS.1770 loudness, true peak, and transparent normalization gain.
Structs§
- Loudness
Layout - Ordered interleaved channel layout for loudness measurement.
- Loudness
Report - Standards-named integrated, momentary, gating, and true-peak evidence.
- Loudness
Spec - Complete bounded policy for EBU/ITU loudness and true-peak measurement.
- Momentary
Loudness - One 400 ms EBU momentary block.
- Normalization
Report - Normalized PCM plus fully visible gain, ceiling, and clipping evidence.
- Normalization
Spec - Target and safety ceiling for transparent loudness normalization.
- PcmRenderer
- A renderer that synthesizes tones into interleaved PCM
f32samples and encodes them as WAV. - Phase
Vocoder Report - Visible PCM and policy evidence returned by
phase_vocode. - Renderer
Options - Configuration for a
PcmRenderer. - Sound
Render Lib - Host-registered lib exporting the PCM renderer card.
- True
Peak Policy - Bandlimited true-peak interpolation policy.
- True
Peak Report - Sample-peak and interpolated true-peak evidence.
- Vocoder
Policy - Complete bounded policy for offline monophonic phase vocoding.
Enums§
- Frequency
Weighting - Frequency weighting applied before gated loudness integration.
- Gating
Policy - Block-gating policy for integrated loudness.
- Instantaneous
Frequency Policy - Policy used to turn analysis-frame phase into synthesis frequency.
- Loudness
Channel - Semantic channel position used by ITU-R BS.1770 energy weighting.
- Loudness
Error - Invalid loudness input, bound, or standards policy.
- Phase
Lock Policy - Relationship imposed between neighboring short-time Fourier bins.
- Phase
Unwrap Policy - Policy used to choose an unwrapped phase residual.
- Sound
Render Error - Error raised by sound rendering and WAV encoding.
- Transient
Policy - Attack-handling policy for the phase vocoder.
- Vocoder
Error - Invalid phase-vocoder policy or delegated STFT/signal failure.
Statics§
- RECIPES
- Cookbook recipes for this lib, embedded at build time.
Functions§
- install_
sound_ render_ lib - Installs the sound-render lib into
cx, registering the PCM renderer export record (idempotent). - measure_
loudness - Measures complete 400 ms momentary blocks, gated integrated loudness, and bandlimited true peak under one retained policy.
- normalize_
loudness - Applies one visible scalar gain to reach the requested loudness, then remeasures without clipping, limiting, or concealing a true-peak violation.
- phase_
vocode - Applies a bounded offline phase vocoder by composing the existing phase-preserving STFT and generic numbers-signal FFT/unwrap owners.