MAIDR Documentation - v3.72.1
    Preparing search index...

    Interface AudioState

    Audio state containing frequency mapping and current value for sonification.

    interface AudioState {
        freq: { min: number; max: number; raw: number | number[] };
        panning: { y: number; x: number; rows: number; cols: number };
        group?: number;
        isContinuous?: boolean;
        trend?: CandlestickTrend;
        zeroClick?: boolean;
        glide?: "up" | "down";
        volumeMultiplier?: number;
        volumeScale?: number;
    }
    Index

    Properties

    freq: { min: number; max: number; raw: number | number[] }
    panning: { y: number; x: number; rows: number; cols: number }
    group?: number

    Group index for multiclass plots. Used to determine which audio palette entry to use. If undefined, defaults to 0 (single group).

    isContinuous?: boolean

    Indicates whether the audio is continuous. If true, the audio plays without interruption. If false or undefined, the audio may have discrete segments.

    Candlestick trend information for audio palette selection. Used by AudioService to determine appropriate audio characteristics. Only applicable for candlestick traces.

    zeroClick?: boolean

    When true, a raw value of exactly 0 plays a percussive click instead of the default low "null" tone. Used by the candlestick delta layer, where zero means "exactly on the reference line" — a meaningful data point, not missing data.

    glide?: "up" | "down"

    Pitch-glide direction for the tone. When set, the tone glides its pitch over the note duration to convey a direction while freq.raw still sets the base pitch: 'up' sweeps upward (a rising "whoosh"), 'down' sweeps downward (a falling drop). Used by the candlestick delta layer so above-line points rise and below-line points fall, independent of the base pitch that still encodes the delta magnitude. Ignored for the zero (zeroClick) path.

    volumeMultiplier?: number

    Volume multiplier for dynamic volume control. Used to scale audio volume based on data characteristics (e.g., violin plot width). If undefined, defaults to 1.0 (no volume scaling). Range should typically be between 0.0 and 1.0, but can exceed 1.0 for emphasis.

    volumeScale?: number

    Volume scale for dynamic volume control (0-1 range). Used to scale audio volume based on density values (e.g., violin plot density). If undefined, defaults to 1.0 (no volume scaling). Range is 0.0 to 1.0, where 0.0 = quietest and 1.0 = loudest.