Class BasicZone
- Namespace
- SpessaSharp.SoundBank
- Assembly
- SpessaSharp.dll
public sealed class BasicZone
- Inheritance
-
BasicZone
- Inherited Members
Fields
BagByteSize
public const int BagByteSize = 4
Field Value
Generators
The zone's generators.
public readonly List<Generator> Generators
Field Value
KeyRange
The zone's key range. Min -1 means that it is a default value
public (int Min, int Max) KeyRange
Field Value
Modulators
The zone's modulators.
public readonly List<Modulator> Modulators
Field Value
VelRange
The zone's velocity range. Min -1 means that it is a default value
public (int Min, int Max) VelRange
Field Value
Properties
FineTuning
The current tuning in cents, taking in both coarse and fine generators.
public int FineTuning { get; set; }
Property Value
HasKeyRange
public bool HasKeyRange { get; }
Property Value
HasVelRange
public bool HasVelRange { get; }
Property Value
LoopMode
The current SamplesMode. No Loop (0) is the default.
public Generator.LoopMode LoopMode { get; set; }
Property Value
ReleaseModEnv
The current release mod envelope.
public int ReleaseModEnv { get; set; }
Property Value
ReleaseVolEnv
The current release vol envelope.
public int ReleaseVolEnv { get; set; }
Property Value
Methods
Add(params ReadOnlySpan<Generator>)
Adds generators to the zone.
public void Add(params ReadOnlySpan<Generator> generators)
Parameters
generatorsReadOnlySpan<Generator>Generators
AddToGenerator(Type, int, bool)
Adds to a given generator, or its default value.
public void AddToGenerator(Generator.Type type, int value, bool validate = true)
Parameters
typeGenerator.TypeThe generator type.
valueintThe value to add.
validateboolIf the value should be clamped to allowed limits.
CopyFrom(BasicZone)
public void CopyFrom(BasicZone zone)
Parameters
zoneBasicZone
GetGenerator(Type)
public short? GetGenerator(Generator.Type type)
Parameters
Returns
GetGenerator(Type, short)
Gets a generator value.
public short GetGenerator(Generator.Type type, short def)
Parameters
typeGenerator.TypeThe generator type.
defshortIf the generator is not found, this value is returned. A default value can be passed here, or null for example, to check if the generator is set.
Returns
GetWriteGenerators()
Filters the generators and prepends the range generators.
public List<Generator> GetWriteGenerators()
Returns
SetGenerator(Type, int?, bool)
Sets a generator to a given value if preset, otherwise adds a new one.
public void SetGenerator(Generator.Type type, int? value = null, bool validate = true)
Parameters
typeGenerator.TypeThe generator type.
valueint?The value to set. Set to null to remove this generator (set as "unset").
validateboolIf the value should be clamped to allowed limits.
Exceptions
- ArgumentException
Type must be set using a different method