Audio
Root semantic audio values and codecs plus the C++-parity FnAudio signal-processing family.
Examples
Audio
Functions
Channel layout → expected channel count (0 = unknown layout).
Best-effort layout for a raw channel count. Three channels remain unknown: channel count alone cannot distinguish L/R/LFE (2.1) from L/C/R (3.0).
Classes
12 members
─── Audio ─────────────────────────────────────────────────────────────────── Semantic planar float32 audio value composed over oa::Matrix. The matrix view is [channels, samples]; sample rate and layout stay attached to that storage.
Source9 members
0 members
0 members
0 members
10 members
17 members
0 members
0 members
─── Biquad Coefficients ───────────────────────────────────────────────────── Real, a0-normalized coefficients for y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2] - a1*y[n-1] - a2*y[n-2]. biquad() applies each channel independently with zero initial state.
Source0 members
0 members
─── Mel Spectrogram Configuration ────────────────────────────────────────────
Source0 members
─── MFCC Configuration ───────────────────────────────────────────────────────
Source0 members
─── STFT Configuration ───────────────────────────────────────────────────────
SourceEnums
─── ChannelLayout ────────────────────────────────────────────────────────────
Mono · Stereo · Stereo21 · Surround51 · Surround71 · Unknown
Encoded audio formats owned by OA. Keep this independent from containers: the same elementary stream can be written to MP4, Matroska or a raw sink.
PcmS16
Functions
amplitudeToDb: Convert waveform amplitude to a finite dB matrix with a silence floor.
biquad: Apply one stable a0-normalized biquad independently per channel with zero initial state.
clip: Clamp waveform samples to a finite range while preserving audio metadata.
Stateless CPU codec boundaries. Decode uploads planar Float32 storage through the active engine. encoding is an explicit synchronous host boundary; the semantic overload completes and reads back its input.
fade: Apply linear fade-in and fade-out envelopes measured in samples.
gain: Apply scalar gain in dB while preserving audio metadata.
melSpectrogram: Mel feature matrix in [Channels, NumMels, Frames] layout.
mfcc: Orthonormal DCT-II coefficients of the log-mel feature matrix.
mix: Weighted sum of two audio values with identical rate, layout, shape, and dtype.
normalize: Peak or RMS normalization to a target dB level while preserving audio metadata.
preEmphasis: Apply y[n] = x[n] - alpha*x[n-1] while preserving audio metadata.
resample: Windowed-sinc resampling with sample rate derived from the input audio value.
reverb: Render a finite zero-state Schroeder reverberation tail with decay time in seconds and a dry/wet mix.
saturate: Apply a tanh soft-clipping waveshaper with drive in dB and a dry/wet mix.
sosFilter: Apply one to 64 stable a0-normalized second-order sections as a zero-state cascade.
stft: Short-time Fourier magnitude transform to [Channels, Frames, Bins].
toMono: Average channels into one mono channel while retaining the sample rate.
waveformEnvelope: Reduce multichannel audio to a peak-preserving min/max display matrix.