Struct Generator

Namespace
SpessaSharp.SoundBank
Assembly
SpessaSharp.dll
public readonly struct Generator
Inherited Members

Constructors

Generator(Type, int, bool)

Constructs a new generator

public Generator(Generator.Type type, int value, bool validate = true)

Parameters

type Generator.Type

Generator type

value int

Generator value

validate bool

If the limits should be validated and clamped.

Fields

Amount

public static readonly int Amount

Field Value

int

ByteSize

public const int ByteSize = 4

Field Value

int

GType

The generator's SF2 type.

public readonly Generator.Type GType

Field Value

Generator.Type

Limits

public static readonly FrozenDictionary<Generator.Type, (short Min, int Max, short Def, int NRPN)> Limits

Field Value

FrozenDictionary<Generator.Type, (short Min, int Max, short Def, int NRPN)>

List

public static readonly Generator.Type[] List

Field Value

Type[]

Max

public static readonly short Max

Field Value

short

Value

The generator's 16-bit value.

public readonly short Value

Field Value

short

Methods

Copy(List<Generator>, List<Generator>)

public static List<Generator> Copy(List<Generator> target, List<Generator> source)

Parameters

target List<Generator>
source List<Generator>

Returns

List<Generator>

HasDefaultValue(Generator)

public static bool HasDefaultValue(Generator g)

Parameters

g Generator

Returns

bool

IsDefaultValue(Type, int)

public static bool IsDefaultValue(Generator.Type type, int value)

Parameters

type Generator.Type
value int

Returns

bool

Write(ref Span<byte>)

public void Write(ref Span<byte> genData)

Parameters

genData Span<byte>