spessasynth_lib documentation
    Preparing search index...

    Class SoundBankManager

    The sound bank manager allows for handling multiple sound banks with a single synthesizer instance.

    It is accessible via the BasicSynthesizer.soundBankManager property.

    Every operation sends a new presetListChange event.

    Index
    • get priorityOrder(): string[]

      The IDs of the sound banks in the current order (from the most important to the least). This can be used to set or retrieve the current order. Presets in the first bank override the second bank if they have the same MIDI patch and so on.

      Returns string[]

    • set priorityOrder(newList: string[]): void

      Rearranges the sound banks in a given order.

      Parameters

      • newList: string[]

        The order of sound banks, a list of identifiers. The first one overrides the second.

      Returns void

    • Adds a new sound bank with a given ID to the list, or replaces an existing one.

      Parameters

      • soundBankBuffer: ArrayBuffer

        The new sound bank to add, the binary data of the file.

      • id: string

        The sound bank's unique identifier. If it already exists, it will be replaced.

      • bankOffset: number = 0

        The sound bank's bank MSB offset. Default is 0.

      Returns Promise<void>

      Error If the sound bank could not be loaded. The soundBankError event is also emitted.

    • Removes a sound bank with a given ID from the sound bank list.

      Parameters

      • id: string

        The ID of the sound bank to remove.

      Returns Promise<void>