Struct SF2WriteOptions

Namespace
SpessaSharp.SoundBank.SoundFont
Assembly
SpessaSharp.dll

Options for writing a SoundFont2 file.

public readonly record struct SF2WriteOptions : IEquatable<SF2WriteOptions>
Implements
Inherited Members

Constructors

SF2WriteOptions(bool, ProgressFunc?, string?, bool, bool, bool)

Options for writing a SoundFont2 file.

public SF2WriteOptions(bool Compress, SoundBank.ProgressFunc? ProgressFunc, string? Software, bool WriteDefaultModulators, bool WriteExtendedLimits, bool Decompress)

Parameters

Compress bool

If the soundfont should be compressed with a given function. This changes the version to 3.0.

ProgressFunc SoundBank.ProgressFunc

A function to show progress for writing large banks. It can be undefined.

Software string

The ISFT field to set when writing. If unset, "SpessaSynth" is written. This field indicates the last software that was used to edit this sound bank.

WriteDefaultModulators bool

If the DMOD chunk should be written. Recommended. Note that it will only be written if the modulators are unchanged.

WriteExtendedLimits bool

If the XDTA chunk should be written to allow virtually infinite parameters. Recommended. Note that it will only be written needed.

Decompress bool

If an SF3 bank should be decompressed back to SF2. Not recommended. This changes the version to 2.4.

Fields

Default

public static readonly SF2WriteOptions Default

Field Value

SF2WriteOptions

Properties

Compress

If the soundfont should be compressed with a given function. This changes the version to 3.0.

public bool Compress { get; init; }

Property Value

bool

Decompress

If an SF3 bank should be decompressed back to SF2. Not recommended. This changes the version to 2.4.

public bool Decompress { get; init; }

Property Value

bool

ProgressFunc

A function to show progress for writing large banks. It can be undefined.

public SoundBank.ProgressFunc? ProgressFunc { get; init; }

Property Value

SoundBank.ProgressFunc

Software

The ISFT field to set when writing. If unset, "SpessaSynth" is written. This field indicates the last software that was used to edit this sound bank.

public string? Software { get; init; }

Property Value

string

WriteDefaultModulators

If the DMOD chunk should be written. Recommended. Note that it will only be written if the modulators are unchanged.

public bool WriteDefaultModulators { get; init; }

Property Value

bool

WriteExtendedLimits

If the XDTA chunk should be written to allow virtually infinite parameters. Recommended. Note that it will only be written needed.

public bool WriteExtendedLimits { get; init; }

Property Value

bool