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

    Return value of useMetronome.

    interface UseMetronomeResult {
        bar: number | null;
        beat: number | null;
        isRunning: boolean;
        isSupported: boolean;
        start: () => MetronomeStart | null;
        stop: () => void;
    }
    Index

    Properties

    bar: number | null

    Bar since the first beat of the piece: negative during the count-in, 0 for the first bar; null when not running

    beat: number | null

    Beat within the bar, 1-based, as it sounds; null when not running

    isRunning: boolean
    isSupported: boolean

    Whether this browser has Web Audio

    start: () => MetronomeStart | null

    Start the clicks. Call from a user gesture so audio is allowed to run. null when audio is unavailable

    stop: () => void