PanoramicData.MusicGeneration.SoundFonts 0.1.33

dotnet add package PanoramicData.MusicGeneration.SoundFonts --version 0.1.33
                    
NuGet\Install-Package PanoramicData.MusicGeneration.SoundFonts -Version 0.1.33
                    
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="PanoramicData.MusicGeneration.SoundFonts" Version="0.1.33" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PanoramicData.MusicGeneration.SoundFonts" Version="0.1.33" />
                    
Directory.Packages.props
<PackageReference Include="PanoramicData.MusicGeneration.SoundFonts" />
                    
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 PanoramicData.MusicGeneration.SoundFonts --version 0.1.33
                    
#r "nuget: PanoramicData.MusicGeneration.SoundFonts, 0.1.33"
                    
#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 PanoramicData.MusicGeneration.SoundFonts@0.1.33
                    
#: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=PanoramicData.MusicGeneration.SoundFonts&version=0.1.33
                    
Install as a Cake Addin
#tool nuget:?package=PanoramicData.MusicGeneration.SoundFonts&version=0.1.33
                    
Install as a Cake Tool

PanoramicData.MusicGeneration.SoundFonts

Optional sampled-instrument rendering for scores generated by PanoramicData.MusicGeneration, using MeltySynth 2.4.1 (MIT).

dotnet add package PanoramicData.MusicGeneration.SoundFonts

Supply an SF2 bank whose terms permit your intended use. No bank is bundled in this package and the adapter performs no network requests.

using PanoramicData.MusicGeneration;
using PanoramicData.MusicGeneration.SoundFonts;

var score = SongGenerator.Generate(42, 60, 11025);
var renderer = new SoundFontRenderer(File.ReadAllBytes("my-bank.sf2"), "my-bank");
var result = await renderer.RenderAsync(score);
File.WriteAllBytes("song.wav", result.Song.ToWav());

Inspect renderer.Presets and set SoundFontRenderOptions.Parts to choose bank, zero-based program and MIDI velocity for each role. Defaults require GM strings, acoustic bass, piano and a standard percussion kit. Missing presets fail explicitly. The input bank limit is 64 MiB; output rates are 16,000–96,000 Hz, default 22,050.

The returned song retains the written notes and section boundaries, adds raw stems for mute/solo, and supplies one full-mix normalisation gain. Output is mono, with effects disabled and release tails clipped at the requested duration. The metadata records the bank SHA-256, renderer version, settings and instrument assignments.

Native .NET and browser WebAssembly use the same managed adapter. Repeatability is scoped to the bank, renderer, settings and runtime; cross-platform bit-identical PCM is not promised. The procedural core and its golden output remain unchanged.

See API/design, asset terms and resource budgets and the same-score demonstration.

Live keyboard notes

renderer.CreateKeyboardVoice(program, midi, velocity, sampleRate) starts a bank-0 note. Call Render(sampleCount) sequentially for small mono PCM blocks, then Release() when the key is lifted and keep rendering its release tail. Release is idempotent and uses the SF2 instrument's own note-off envelope; no per-block peak normalisation is applied. Each voice is independent, including repeated overlapping pitches. The caller owns scheduling, mixing and voice cleanup. The demo keyboard uses this path for held notes and piano damping; score rendering remains unchanged.

Product 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. 
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
0.1.33 90 10/22/2026
0.1.21 90 10/22/2026
0.1.20 87 10/21/2026
0.1.19 98 10/21/2026
0.1.16 94 10/20/2026
0.1.15 97 10/20/2026
0.1.14 90 10/20/2026