spessasynth_core documentation
    Preparing search index...

    Class BasicSoundBank

    This module handles parsing and writing SoundFont2 (.sf2, .sf3 and .sfogg) files. It represents a single sound bank.

    It also contains support for .dls files and experimental read and write support for 64-bit SFE.

    Specifications:

    Index
    customDefaultModulators: boolean = false

    If the sound bank has custom default modulators (DMOD).

    defaultModulators: Modulator[] = ...

    Sound bank's default modulators.

    instruments: BasicInstrument[] = []

    An array of all instruments in the bank.

    presets: BasicPreset[] = []

    An array of all presets in the bank, ordered by bank and preset number.

    samples: BasicSample[] = []

    An array of all samples in the bank.

    soundBankInfo: SoundBankInfoData = ...

    The metadata of this sound bank.

    type: "sf2" | "sfe" | "dls"

    The type of the sound bank that was loaded. Either sf2 for SoundFont2/SoundFont3 or dls for DownLoadable Sounds or sfe for SF-Enhanced.

    ready: Promise<void> = StbVorbis.ready

    A Promise object indicating if the SF3/SF2Pack decoder is ready. Make sure to await it if you are loading SF3/SF2Pack files. It only needs to be awaited once, globally. Then all banks can be loaded synchronously.

    • Writes the sound bank as an SFE 4 file. This enables features such as bank LSB and RIFF64. Note that spessasynth is currently the only software that can read these files.

      Parameters

      • writeOptions: Partial<SFEWriteOptions> = DEFAULT_SFE_WRITE_OPTIONS

        Options for writing the file.

      Returns ArrayBuffer

      The binary representation of the file.