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

    Options for usePracticeSession.

    interface UsePracticeSessionOptions {
        audioDeviceId?: string;
        bpm: number;
        captureMidi?: boolean;
        countInBars?: number;
        endGraceMs?: number;
        exercise?: { code: string; musicxml: string } | null;
        idleEndMs?: number;
        instrument?: InstrumentFamily;
        labels?: Partial<PracticeSessionLabels>;
        liveFromMidi?: boolean;
        maxTakeMs?: number;
        midiInputId?: string;
        mode: PacingMode;
        musicxml: string | null;
        onError?: (error: Error) => void;
        onTakeGraded?: (result: TakeResult) => void;
        playerRef?: RefObject<MusicXmlPlayerHandle | null>;
        profile?: AudioProfile;
        score: Score | null;
        strictness?: LiveStrictness;
        title: string | null;
    }
    Index

    Properties

    audioDeviceId?: string

    Microphone to use

    bpm: number

    Quarter notes per minute, for the metronome and the clock the take is judged against

    captureMidi?: boolean

    Record MIDI as well as audio (default: true)

    countInBars?: number

    Bars of clicks before the first beat (default: 1)

    endGraceMs?: number

    How long after the piece ends the take keeps recording, so the last note rings out (default: 1 s)

    exercise?: { code: string; musicxml: string } | null

    The sight-reading exercise on the card, when there is one, so a take of it keeps the code

    idleEndMs?: number

    A free take that has heard nothing for this long ends on its own (default: 2 minutes)

    instrument?: InstrumentFamily

    How the microphone is listened to (default: 'keyboard')

    labels?: Partial<PracticeSessionLabels>
    liveFromMidi?: boolean

    Follow MIDI instead of the microphone while recording (default: false)

    maxTakeMs?: number

    A take ends on its own at this length (default: 10 minutes)

    midiInputId?: string

    Record from this MIDI input only

    musicxml: string | null

    The score's MusicXML, kept with each take

    onError?: (error: Error) => void

    Called for microphone, MIDI, audio and grading failures

    onTakeGraded?: (result: TakeResult) => void

    Called with every finished take, graded

    playerRef?: RefObject<MusicXmlPlayerHandle | null>

    The score player, for playback pacing: its clock anchors the take and Play is pressed for the performer

    profile?: AudioProfile

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

    score: Score | null

    The score being practised; nothing records until one is set

    strictness?: LiveStrictness

    How closely a note must sit on its beat under a set tempo (default: 'normal')

    title: string | null

    The piece's name, kept with each take