Foundational audio DSP library: samples, buffers, oscillators, envelopes, biquad filters, ring buffers, windows and FFT. Pure, in-memory, all targets.
| Package | Contents |
|---|---|
| maya0513/audio/sample | Unit-sample conversions (Double <-> Int16/Int32/Float) with saturation, dB <-> linear gain, deterministic TPDF Ditherer. clamp_int16 is proven. |
| maya0513/audio/buffer | Interleaved AudioBuffer: planar conversion, gain, mix, clip, peak / RMS, normalise to an explicit peak target, fades, silence trim, crossfade, mid/side, reverse. |
| maya0513/audio/oscillator | Phase-accumulator oscillator (sine / square / sawtooth / triangle) with polyBLEP on the discontinuous waveforms, TableOscillator over caller-supplied tables, and a deterministic LCG noise generator (white / pink / brown). |
| maya0513/audio/envelope | ADSR, AR and ASR envelopes as sample-stepped state machines, with retrigger-from-current-level. |
| maya0513/audio/filter | RBJ Audio EQ Cookbook biquads (the full family: low/high-pass, both band-pass forms, notch, all-pass, peaking, shelves), Direct Form I processing, Zavalishin trapezoidal SVF, one-pole low-pass and DC blocker. |
| maya0513/audio/ringbuffer | Fixed-capacity ring buffer. normalize_index is proven. |
| maya0513/audio/window | Rectangular / Hann / Hamming / Blackman / Blackman-Harris / Kaiser / FlatTop / Bartlett / Welch windows. |
| maya0513/audio/fft | Radix-2 FFT / IFFT over a Complex type, magnitude spectrum, real-input FFT, arbitrary-length DFT (Bluestein), DCT-II/III, Goertzel single-bin analysis. Floating-point DSP is covered by tolerance tests, not proofs. |
| maya0513/audio/fir | Windowed-sinc FIR design (low-pass / high-pass), direct convolution and FFT-based convolution. |
| maya0513/audio/resample | Windowed-sinc resampling between two sample rates given as parameters. |
| maya0513/audio/dynamics | Peak / RMS level detector with attack/release smoothing, and a static soft-knee gain-computer curve. No presets, makeup gain or side-chaining. |
| maya0513/audio/analysis | Numeric analysis only: autocorrelation, zero-crossing rate, spectral centroid and flatness. |
| maya0513/audio/wav | In-memory WAV codec on Bytes: PCM 8/16/24/32-bit and float32 encode / decode (chunk skipping, header validation, roundtrip-tested), plus smpl chunk raw numeric metadata. Unsupported formats are rejected explicitly. No file IO. |
let osc = @oscillator.Oscillator::new(@oscillator.Waveform::Sine, frequency=440.0, sample_rate=48000)
let samples = osc.render(4800) // 0.1 s of A4just check # moon check --deny-warn --target all
just test # moon test on native, wasm, wasm-gc and js
just coverage # must report no uncovered lines
just prove # moon prove for the proof-enabled packages
just bench # moon bench --target native
just ci # everythingInstall
Download zipFoundational audio DSP library: samples, buffers, oscillators, envelopes, biquad filters, ring buffers, windows and FFT. Pure, in-memory, all targets.