Transformations.Audio 2.0.4.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Transformations.Audio --version 2.0.4.3
                    
NuGet\Install-Package Transformations.Audio -Version 2.0.4.3
                    
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="Transformations.Audio" Version="2.0.4.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Transformations.Audio" Version="2.0.4.3" />
                    
Directory.Packages.props
<PackageReference Include="Transformations.Audio" />
                    
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 Transformations.Audio --version 2.0.4.3
                    
#r "nuget: Transformations.Audio, 2.0.4.3"
                    
#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 Transformations.Audio@2.0.4.3
                    
#: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=Transformations.Audio&version=2.0.4.3
                    
Install as a Cake Addin
#tool nuget:?package=Transformations.Audio&version=2.0.4.3
                    
Install as a Cake Tool

Transformations.Audio

Sample-rate conversion for .NET, with a repeatable, versioned fidelity benchmark behind every algorithm choice.

.NET 8 | 9 | 10

๐Ÿ“– Overview

Transformations.Audio resamples interleaved PCM audio (float[]) between arbitrary sample rates - the everyday "convert this 48 kHz recording to 44.1 kHz" or "upsample this 16 kHz voice clip to 48 kHz" problem. It ships several interchangeable algorithms behind one interface, from a cheap linear interpolator to alias-suppressing windowed-sinc variants, so you can pick the right speed/fidelity tradeoff for your use case.

Every algorithm in this package is backed by a deterministic fidelity suite that measures SNR, PSNR, and MSE across speech, music, transient, and alias-stress test signals - see DEVELOPMENT.md for the full evidence trail behind each one, including why some candidates were promoted and others retired.

๐Ÿ“ฆ Install

<PackageReference Include="Transformations.Audio" Version="2.0.4.3" />

Depends only on NAudio (for WaveFormat interop). Targets .NET 8, 9, and 10.

๐Ÿš€ Quick start

using Transformations.Audio.Resampler;

float[] input = GetSamples(); // interleaved PCM, e.g. from a WAV file
float[] output = Sinc.Resample(input, inRate: 48000, outRate: 44100, channels: 2);

Or resolve rates/channels from NAudio.Wave.WaveFormat directly:

float[] output = Sinc.Resample(input, inFormat, outFormat);

Extension-method form, including Span<float>/Memory<float> overloads:

using Transformations.Audio.Resampler;

float[] output = input.ResampleLinear(48000, 44100, channels: 2);

๐ŸŽ›๏ธ Choosing an algorithm

Class What it is Use it when
Linear Straight-line interpolation between samples You need the cheapest possible conversion and don't care about aliasing (e.g. quick previews)
Spline Natural cubic spline (C2-continuous, global per-channel fit) Better fidelity than Linear at a modest cost, no anti-alias filtering
Sinc Windowed-sinc convolution, adjustable quality via ResampleQuality Highest raw fidelity when the signal has no energy near the new Nyquist (e.g. upsampling)
Hybrid Picks Sinc or Linear based on sample rate A reasonable one-size default when you don't want to choose

Sinc.Resample takes an optional ResampleQuality (SuperFast through BestQuality) trading kernel width for speed. Plain Sinc has no anti-alias rolloff, so it can lose fidelity on aggressive downsampling of high-energy content - see DEVELOPMENT.md for alias-suppressing variants and the evidence behind when to reach for one.

๐Ÿงช Evidence, not vibes

Every algorithm swap in this package's history was decided by a repeatable fidelity suite, not by ear. If you want to see the actual numbers, reproduce them, or understand why a given default was chosen, DEVELOPMENT.md has the full build/test instructions and the evidence trail.

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.4.4 112 7/8/2026
2.0.4.3 104 7/7/2026