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

    Options for usePlayedAnswer.

    interface UsePlayedAnswerOptions {
        audioDeviceId?: string;
        instrument?: InstrumentFamily;
        listen: boolean;
        midiInputId?: string;
        onError?: (error: Error) => void;
        onJudged?: (answer: PlayedAnswer) => void;
        profile?: AudioProfile;
        question: TheoryQuestion | null;
        source?: LiveSource;
    }
    Index

    Properties

    audioDeviceId?: string

    The microphone to use; omit for the browser's default

    instrument?: InstrumentFamily

    What is played, so the microphone is listened to the right way (default: 'keyboard')

    listen: boolean

    Whether to listen now: the question is unanswered and nothing is sounding that the microphone would hear. Each time it turns on, what was played before is set aside and the answer is listened for afresh

    midiInputId?: string

    Listen to this MIDI input only; omit for every connected input

    onError?: (error: Error) => void

    The instrument could not be opened, or listening failed

    onJudged?: (answer: PlayedAnswer) => void

    The answer was judged: every note to play has been heard, or giveUp was called

    profile?: AudioProfile

    How the microphone is opened (default: 'instrument')

    question: TheoryQuestion | null

    The question being asked; one answered by playing (playAnswer) is listened for, any other is not

    source?: LiveSource

    Follow the microphone ('audio') or a MIDI instrument ('midi') (default: 'audio'). MIDI is opened only when it is followed, so a browser without it, or a MIDI permission refused, never stops the microphone