NokitaKaze.WAVParser 0.1.0

.NET Standard 2.0
dotnet add package NokitaKaze.WAVParser --version 0.1.0
NuGet\Install-Package NokitaKaze.WAVParser -Version 0.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="NokitaKaze.WAVParser" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NokitaKaze.WAVParser --version 0.1.0
#r "nuget: NokitaKaze.WAVParser, 0.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.
// Install NokitaKaze.WAVParser as a Cake Addin
#addin nuget:?package=NokitaKaze.WAVParser&version=0.1.0

// Install NokitaKaze.WAVParser as a Cake Tool
#tool nuget:?package=NokitaKaze.WAVParser&version=0.1.0

WAV Parser

NuGet version (NokitaKaze.WAVParser) Travis

Yet another parser for wave files. I just like to write my own code.

This library could read 8/16/24/32/64-bit audio with WAVE_FORMAT_PCM (pcm_u8, pcm_s16le, pcm_s32le, pcm_s24le, pcm_s32le, pcm_s64le) format and 32/64-float bit with WAVE_FORMAT_IEEE_FLOAT (pcm_f32le, pcm_f64le).

Main reason for this library to exist is to support other library.


You could read any media file, but you need to convert it to WAV.

ffmpeg -i some-media-file.raw -sn -vn -c:a pcm_s16le temporary.wav


var parser = new NokitaKaze.WAVParser.WAVParser("input.wav");
Console.WriteLine("Channels count:\t{0}", parser.ChannelCount);
Console.WriteLine("AudioFormat:   \t{0}", parser.AudioFormat);
Console.WriteLine("BlockAlign:    \t{0}", parser.BlockAlign);
Console.WriteLine("SampleRate:    \t{0}Hz", parser.SampleRate);
Console.WriteLine("BitsPerSample: \t{0}", parser.SamplesCount);
Console.WriteLine("Duration:      \t{0}", parser.Duration);

foreach (var channelSamples in reReader.Samples)
    foreach (var sample in channelSamples)
        // Hint: All samples are doubles for double precision processing
        Console.Write("{0:F8}, ", sample);
// method 2
Stream stream;
var parser = new NokitaKaze.WAVParser.WAVParser(stream);

// method 3
var rawRiffStream = System.IO.File.ReadAllBytes("input.wav");
var parser = new NokitaKaze.WAVParser.WAVParser(byteArray);


// method #1
var byteArray = parser.GetDataAsRiff();

// method #2

// method #3
Stream randomStream = ...;

Create new

var rnd = new System.Random.Random();

var parser = new NokitaKaze.WAVParser.WAVParser();
parser.ChannelCount = 1;
parser.Samples = new List<List<double>>() {new List<double>()};
parser.BlockAlign = (ushort) (parser.ChannelCount * parser.BitsPerSample / 8);

for (int i = 0; i < 1000; i++)
    // random samples to stream
    parser.Samples[0].Add(rnd.NextDouble() * 2 - 1);

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. 
.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 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  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)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

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
0.1.0 2,797 5/2/2020