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
CompressboolIf the soundfont should be compressed with a given function. This changes the version to 3.0.
ProgressFuncSoundBank.ProgressFuncA function to show progress for writing large banks. It can be undefined.
SoftwarestringThe
ISFTfield to set when writing. If unset, "SpessaSynth" is written. This field indicates the last software that was used to edit this sound bank.WriteDefaultModulatorsboolIf the DMOD chunk should be written. Recommended. Note that it will only be written if the modulators are unchanged.
WriteExtendedLimitsboolIf the XDTA chunk should be written to allow virtually infinite parameters. Recommended. Note that it will only be written needed.
DecompressboolIf 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
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
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
ProgressFunc
A function to show progress for writing large banks. It can be undefined.
public SoundBank.ProgressFunc? ProgressFunc { get; init; }
Property Value
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
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
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; }