Class SoundBankManager
- Namespace
- SpessaSharp.Synthesizer.Engine
- Assembly
- SpessaSharp.dll
public sealed class SoundBankManager : IPresetGetter
- Inheritance
-
SoundBankManager
- Implements
- Inherited Members
Constructors
SoundBankManager(Action)
public SoundBankManager(Action presetListChangeCallbank)
Parameters
presetListChangeCallbankActionSupplied by the parent synthesizer class, this is called whenever the preset list changes.
Properties
PresetList
The list of all presets in the sound bank stack.
public IReadOnlyList<MidiPatch.Full> PresetList { get; }
Property Value
PriorityOrder
The current sound bank priority order.
public List<string> PriorityOrder { get; set; }
Property Value
Methods
Add(SoundBank, string, int)
Adds a new sound bank with a given ID, or replaces an existing one.
public void Add(SoundBank font, string id, int bankOffset = 0)
Parameters
fontSoundBankThe sound bank to add.
idstringThe ID of the sound bank.
bankOffsetintThe bank offset of the sound bank.
ClearUsedKeysCache()
public void ClearUsedKeysCache()
DeleteSoundBank(string)
Deletes a given sound bank by its ID.
public void DeleteSoundBank(string id)
Parameters
idstringThe ID of the sound bank to delete.
Exceptions
Destroy()
Clears the sound bank list and destroys all sound banks.
public void Destroy()
GetPreset(MidiPatch, System)
Gets a given preset from the sound bank stack.
public BasicPreset? GetPreset(MidiPatch patch, Midi.System system)
Parameters
patchMidiPatchThe MIDI patch to search for.
systemMidi.SystemThe MIDI system to select the preset for.
Returns
- BasicPreset
An object containing the preset and its bank offset.