ZeroAudio.Core 1.1.0

dotnet add package ZeroAudio.Core --version 1.1.0
                    
NuGet\Install-Package ZeroAudio.Core -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroAudio.Core" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroAudio.Core" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ZeroAudio.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZeroAudio.Core --version 1.1.0
                    
#r "nuget: ZeroAudio.Core, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZeroAudio.Core@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZeroAudio.Core&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ZeroAudio.Core&version=1.1.0
                    
Install as a Cake Tool

๐ŸŽต ZeroAudio: Sovereign Pure C# Audio Engineering & DSP Engine

ZeroPlatform Tier NuGet Version License: MIT Zero External Dependencies Tests: 27 Passed Multi-Targeting

Architectural Standard: 100% Pure C# BCL, Zero External Unmanaged Dependencies (no NAudio, FFmpeg, or BASS DLLs required), Pragmatic Minimal Memory Allocation, Multi-Targeting across .NET 8.0, .NET Framework 4.6.2, and .NET Standard 2.0.

ZeroAudio is a sovereign, high-throughput audio engineering, digital signal processing (DSP), and streaming engine for .NET. Operating within Tier 3 (Perception & AI) of the ZeroPlatform / Zero Universe ecosystem, it provides pure C# primitives for RIFF/WAVE container encoding/decoding, low-latency SPSC circular ring buffers, multi-channel matrix routing, Catmull-Rom cubic resampling, peak limiting, dynamic compression, biquad equalizers, and waveform synthesis.


๐Ÿ›๏ธ Design Philosophy: Minimal Allocation & Pragmatic Efficiency

Unlike dogmatic zero-allocation frameworks that compromise readability with overly complex pointer gymnastics, ZeroAudio adopts the modern ZeroPlatform Pragmatic Standard:

  • Hot-path Zero Allocation: Critical real-time audio sample processing loops (Span<float>, ReadOnlySpan<byte>) execute without allocating on the managed heap.
  • Pooled Buffers: Audio memory blocks rent and return memory via ArrayPool<T>.Shared to eliminate garbage collector (GC) pauses and audio stuttering (pops and clicks).
  • Pure C# Sovereignty: Eliminates brittle native C++ wrapper dependencies, enabling immediate cross-platform deployment across Windows, Linux, macOS, and edge IoT devices.

๐Ÿ“ฆ Key Subsystem Capabilities

Component Namespace Description
WavReader & WavWriter ZeroAudio.Formats Streaming RIFF/WAVE encoder and decoder supporting 8/16/24/32-bit linear PCM and 32-bit IEEE Float with automatic header size finalization.
AudioBuffer ZeroAudio.Buffers Pooled, multi-channel float audio frame container with instant RMS, peak dBFS, gain scaling, and channel deinterleaving.
AudioRingBuffer ZeroAudio.Buffers Lock-free Single-Producer Single-Consumer (SPSC) circular FIFO buffer with power-of-two bitwise wrapping for real-time soundcard decoupling.
SampleRateConverter ZeroAudio.Processing High-speed linear interpolation and 4-point 3rd-order Catmull-Rom cubic Hermite resampling between arbitrary sample rates.
ChannelMatrix ZeroAudio.Processing Mono โ†” Stereo conversion, ITU-R BS.775 5.1 surround-to-stereo downmixing, and channel interleaving / deinterleaving.
GainController ZeroAudio.Processing Volume attenuation, constant-power / linear panning, linear fade-in/fade-out ramps, and cubic polynomial soft saturation.
AudioLimiter ZeroAudio.Dynamics Instantaneous attack peak limiter preventing digital clipping distortion above specified dBFS ceilings.
AudioCompressor ZeroAudio.Dynamics Configurable dynamic range compressor with threshold, ratio, attack, release, and makeup gain.
NoiseGate ZeroAudio.Dynamics Fast-attack, hold, and smooth-release noise gate attenuating ambient background noise during speech pauses.
AgcEngine ZeroAudio.Dynamics Automatic Gain Control dynamically leveling speech volume toward target RMS dBFS.
BiquadFilter ZeroAudio.Equalization Direct Form II Transposed IIR biquad filters: LowPass, HighPass, BandPass, Notch, Peaking EQ, LowShelf, HighShelf.
GraphicEqualizer ZeroAudio.Equalization 10-band ISO standard equalizer (31Hz to 16kHz) with per-channel cascading biquad filters.
SignalGenerator ZeroAudio.Synthesis Pure waveform generators (Sine, Square, Triangle, Sawtooth), White/Pink noise, and telephone DTMF dual-tone generation.
AudioMixer ZeroAudio.Synthesis Multi-track weighted audio summing engine with master bus soft saturation.

๐Ÿš€ Quick Start Examples

1. Reading and Writing WAV Files

using ZeroAudio.Formats;

// Read all samples from a WAV file
float[] samples = WavReader.ReadAllSamples("input.wav", out AudioFormat format);
Console.WriteLine($"Loaded: {format.SampleRate}Hz, {format.Channels} channels, {format.BitsPerSample}-bit");

// Process samples (e.g. increase volume by +3 dB)
GainController.ApplyGainDb(samples, 3.0f);

// Write back to a standard 16-bit PCM WAV file
WavWriter.WriteAllSamples("output.wav", samples, AudioFormat.Pcm16Stereo44kHz);

2. High-Performance AudioBuffer Pooling

using ZeroAudio.Buffers;
using ZeroAudio.Formats;

var format = AudioFormat.Float32Stereo48kHz;

// Rent pooled buffer without heap garbage
using var buffer = AudioBuffer.Rent(format, frameCount: 1024);

// Access raw float span for DSP
Span<float> samples = buffer.Samples;

// Compute audio telemetry
float peakDb = buffer.CalculatePeakDb();
float rms = buffer.CalculateRms();

3. Real-Time Dynamic Processing & Equalization

using ZeroAudio.Dynamics;
using ZeroAudio.Equalization;

// Configure a 10-band Graphic Equalizer
var eq = new GraphicEqualizer(sampleRate: 48000, channels: 2);
eq.SetBandGain(0, +3.0f); // Bass boost (+3dB at 31Hz)
eq.SetBandGain(5, +2.0f); // Presence boost (+2dB at 1kHz)

// Configure Brickwall Limiter (-0.2 dBFS ceiling)
var limiter = new AudioLimiter(sampleRate: 48000, ceilingDb: -0.2f);

// In your audio rendering callback loop:
Span<float> frameBuffer = GetAudioFrame();
eq.Process(frameBuffer);
limiter.Process(frameBuffer);

4. Resampling & Channel Downmixing

using ZeroAudio.Processing;

// Resample 44.1 kHz audio to 48.0 kHz with cubic Hermite interpolation
int outFrames = SampleRateConverter.CalculateOutputFrames(inFrames, 44100, 48000);
Span<float> resampled = stackalloc float[outFrames * 2];
SampleRateConverter.ResampleCubic(inSamples, resampled, channels: 2, 44100, 48000);

// Downmix 5.1 surround to stereo
Span<float> stereoOut = stackalloc float[inFrames * 2];
ChannelMatrix.DownmixSurroundToStereo(surroundSamples, stereoOut);

๐Ÿงช Verification & Unit Testing

ZeroAudio is backed by a comprehensive unit test suite covering container round-trips, DSP filter responses, dynamics, and synthesis:

dotnet test -c Release
Passed!  - Failed: 0, Passed: 27, Skipped: 0, Total: 27, Duration: 66 ms - ZeroAudio.Tests.dll (net8.0)
Passed!  - Failed: 0, Passed: 27, Skipped: 0, Total: 27, Duration: 116 ms - ZeroAudio.Tests.dll (net462)

๐Ÿ“„ License

Licensed under the MIT License. Copyright ยฉ 2026 Phong Vรต (kzxl). Part of the ZeroPlatform sovereign ecosystem.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ZeroAudio.Core:

Package Downloads
ZeroSignal.Core

Pure C# digital signal processing (SciPy equivalent): IIR Butterworth/Chebyshev filter synthesis, zero-phase FiltFilt, DWT wavelets, and Levenberg-Marquardt non-linear least squares optimization for .NET.

ZeroAudioVisual

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 569 9/29/2026