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

presetListChangeCallbank Action

Supplied 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

IReadOnlyList<MidiPatch.Full>

PriorityOrder

The current sound bank priority order.

public List<string> PriorityOrder { get; set; }

Property Value

List<string>

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

font SoundBank

The sound bank to add.

id string

The ID of the sound bank.

bankOffset int

The 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

id string

The ID of the sound bank to delete.

Exceptions

Exception

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

patch MidiPatch

The MIDI patch to search for.

system Midi.System

The MIDI system to select the preset for.

Returns

BasicPreset

An object containing the preset and its bank offset.