Hiyve Components - v1.0.0
    Preparing search index...

    Interface NoteSynthOptions

    How a note is sounded.

    interface NoteSynthOptions {
        durationMs?: number;
        gain?: number;
        onError?: (error: Error) => void;
        onNeedsGesture?: () => void;
        samples?: SampleSource;
        sampleWaitMs?: number;
    }
    Index

    Properties

    durationMs?: number

    How long a note rings unless told otherwise, in milliseconds (default: 900)

    gain?: number

    Loudness, 0–1 (default: 0.5)

    onError?: (error: Error) => void

    The audio could not be started

    onNeedsGesture?: () => void

    The browser is holding the sound back until the page is tapped or clicked — as iOS does with sound not started from a tap. Nothing was played, and no note was announced: play again from a tap

    samples?: SampleSource

    Recorded samples to play instead of the built-in voice. The SDK ships none: the app chooses the host, and that set's licence applies. A note the host has no file for, or whose file cannot be fetched, is played with the built-in voice instead

    sampleWaitMs?: number

    How long a note may wait for its sample before the built-in voice plays it instead, in milliseconds (default: 1200)