1llum1n4t1s.NAudio.Sampler
4.0.3
dotnet add package 1llum1n4t1s.NAudio.Sampler --version 4.0.3
NuGet\Install-Package 1llum1n4t1s.NAudio.Sampler -Version 4.0.3
<PackageReference Include="1llum1n4t1s.NAudio.Sampler" Version="4.0.3" />
<PackageVersion Include="1llum1n4t1s.NAudio.Sampler" Version="4.0.3" />
<PackageReference Include="1llum1n4t1s.NAudio.Sampler" />
paket add 1llum1n4t1s.NAudio.Sampler --version 4.0.3
#r "nuget: 1llum1n4t1s.NAudio.Sampler, 4.0.3"
#:package 1llum1n4t1s.NAudio.Sampler@4.0.3
#addin nuget:?package=1llum1n4t1s.NAudio.Sampler&version=4.0.3
#tool nuget:?package=1llum1n4t1s.NAudio.Sampler&version=4.0.3
NAudio.Sampler
A cross-platform software sampler for NAudio. Play MIDI through SoundFont (.sf2) and SFZ instruments, or a single sample mapped across the keyboard. Truly cross-platform — net10.0, no [SupportedOSPlatform].
What's included
- SoundFont playback —
SoundFontSamplerplays.sf2instruments, including the SF2 modulator engine - SFZ playback —
SfzSamplerplays SFZ instruments, withISfzSampleLoader/FileSfzSampleLoaderfor resolving the referenced sample files - Single-sample instruments —
SingleSampleInstrument/SingleSampleSamplermap one sample across the keyboard - Voice engine — a polyphonic
SamplerEnginewith DAHDSR envelopes, LFOs, modulated filters (SamplerFilterType), crossfade curves (SamplerCrossfadeCurve), trigger modes (SamplerTrigger) and reverb/chorus sends
Each sampler is exposed as an ISampleProvider, so it drops straight into any NAudio mixer or output pipeline.
When to use it
Reach for this package when you want to render MIDI to audio using SoundFont or SFZ instruments, or build a sample-based instrument, on any platform NAudio runs on. It builds on NAudio.SoundFile for sample loading and is not pulled in by the NAudio meta-package — reference it explicitly:
dotnet add package NAudio.Sampler
Tutorial
For a worked walkthrough see the NAudio.Sampler tutorial.
See the NAudio documentation site for tutorials and the full API reference, or the GitHub repository for full documentation and tutorials.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- 1llum1n4t1s.NAudio.Core (>= 4.0.3)
- 1llum1n4t1s.NAudio.Midi (>= 4.0.3)
- 1llum1n4t1s.NAudio.SoundFile (>= 4.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
### Fixed
- `WaveFileWriter.WriteSample` が範囲外のfloatを16-bit整数PCMへ書くと符号反転する問題を修正しました。
- `OffsetSampleProvider` のTimeSpan指定が長時間音源でsample数をオーバーフローする問題を修正しました。
- `FadeInOutSampleProvider` の0ミリ秒未満のsample数になるfadeでNaNを出力する問題を修正しました。
- `WaveFileReader` が末尾の不完全なsample frameを返す問題を修正しました。