spessasynth_core documentation
    Preparing search index...

    Class BasicPresetZone

    Represents a single preset zone with an associated BasicInstrument.

    Hierarchy (View Summary)

    Index
    generators: Generator[] = []

    The zone's generators.

    keyRange: GenericRange = ...

    The zone's key range. min -1 means that it is a default value.

    modulators: Modulator[] = []

    The zone's modulators.

    parentPreset: BasicPreset

    The preset this zone belongs to.

    velRange: GenericRange = ...

    The zone's velocity range. min -1 means that it is a default value.

    • get fineTuning(): number

      The current tuning in cents, taking in both coarse and fine generators. Setting this value updates both generators accordingly.

      Returns number

    • set fineTuning(tuningCents: number): void

      The current tuning in cents, taking in both coarse and fine generators. Setting this value updates both generators accordingly.

      Parameters

      • tuningCents: number

      Returns void

    • Gets a generator value.

      Type Parameters

      • K

      Parameters

      • generatorType: GeneratorType

        The generator type.

      • notFoundValue: number | K

        If the generator is not found, this value is returned. A default value can be passed here, or null for example, to check if the generator is set.

      Returns number | K

      The generator value or the provided fallback value.

    • Sets a generator to a given value, overwriting existing one if present.

      Parameters

      • type: GeneratorType

        The generator type.

      • value: number | null

        The value to set. Set to null to remove this generator (set as "unset").

      • validate: boolean = true

        If the value should be clamped to allowed limits.

      Returns void