JS API Reference EnumParameter class

EnumParameter class

Extends: EnumParameter_base

Parameter Class for describing and interacting with Enum Type Parameters in RNBO Uses the CommonParameterMixin

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the EnumParameter class.

Signature

export declare class EnumParameter extends EnumParameter_base 

Properties

changeEvent

read-only

Type: EventSubject<number>

enumValue

Type: EnumValue

The actual enum value for the currently active index value. Use this to set the active index by enum value.

Example

console.log(param.enumValues); // => ["blue", "red", "green"]
param.enumValue = "blue";
console.log(param.value === 0); // => true

enumValues

Type: EnumValue[]

Get an array of available enum values of the parameter

initialValue

read-only

Type: number

type

read-only

Type: ParameterType.Enum

value

Type: number

The current selected index value of the parameter

Example

// Update the current index value
param.value = 2