Class BasicPreset
- Namespace
- SpessaSharp.SoundBank
- Assembly
- SpessaSharp.dll
public sealed class BasicPreset
- Inheritance
-
BasicPreset
- Inherited Members
Constructors
BasicPreset(SoundBank, BasicZone?, Full)
Creates a new preset representation.
public BasicPreset(SoundBank parent, BasicZone? globalZone = null, MidiPatch.Full patch = default)
Parameters
parentSoundBankThe sound bank this preset belongs to.
globalZoneBasicZoneOptional, a global zone to use.
patchMidiPatch.Full
Fields
Genre
Unused metadata
public uint Genre
Field Value
GlobalZone
Preset's global zone
public readonly BasicZone GlobalZone
Field Value
Library
Unused metadata
public uint Library
Field Value
Morphology
Unused metadata
public uint Morphology
Field Value
PHDR_BYTE_SIZE
public const int PHDR_BYTE_SIZE = 38
Field Value
Parent
The parent soundbank instance. Currently used for determining default modulators and XG status.
public readonly SoundBank Parent
Field Value
Patch
public MidiPatch.Full Patch
Field Value
Zones
The preset's zones
public readonly List<BasicPreset.Zone> Zones
Field Value
Properties
BankLSB
public int BankLSB { get; set; }
Property Value
BankMSB
public int BankMSB { get; set; }
Property Value
IsDrum
Checks if this preset is a drum preset
public bool IsDrum { get; }
Property Value
IsGMGSDrum
public bool IsGMGSDrum { get; set; }
Property Value
IsXGDrum
public bool IsXGDrum { get; }
Property Value
Name
public string Name { get; set; }
Property Value
Program
public int Program { get; set; }
Property Value
Methods
CreateZone(BasicInstrument)
Creates a new preset zone and returns it.
public BasicPreset.Zone CreateZone(BasicInstrument instrument)
Parameters
instrumentBasicInstrumentThe instrument to use in the zone.
Returns
Delete()
Unlinks everything from this preset.
public void Delete()
DeleteZone(int)
Deletes an instrument zone from this preset.
public void DeleteZone(int index)
Parameters
indexintThe zone's index to delete.
Matches(MidiPatch)
Checks if the bank and program numbers are the same for the given preset as this one.
public bool Matches(MidiPatch preset)
Parameters
presetMidiPatchThe preset to check.
Returns
Preload(int, int)
Preloads (loads and caches synthesis data) for a given key range.
public void Preload(int keyMin, int keyMax)
Parameters
ToFlattenedInstrument()
Combines preset into an instrument, flattening the preset zones into instrument zones. This is a really complex function that attempts to work around the DLS limitations of only having the instrument layer.
public BasicInstrument ToFlattenedInstrument()
Returns
- BasicInstrument
The instrument containing the flattened zones. In theory, it should exactly the same as this preset.
ToMidiString()
BankMSB:BankLSB:Program:IsGMGSDrum
public string ToMidiString()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ZonesInRange(int, int)
public BasicPreset.InstrumentZoneEnumerable ZonesInRange(int key, int vel)