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

    Props for DrillCard.

    interface DrillCardProps {
        answerArea?: ReactNode;
        children?: ReactNode;
        colors?: Partial<DrillColors>;
        index: number;
        labels?: Partial<DrillCardLabels>;
        loadEngine: NotationEngineLoader;
        names?: TheoryNamesOverrides;
        noteStyles?: ReadonlyMap<string, MusicXmlNoteStyle>;
        onAnswer: (choice: string, correct?: boolean) => void;
        onError?: (error: Error) => void;
        onFinish?: () => void;
        onNext: () => void;
        onSoundingChange?: (sounding: boolean) => void;
        round: DrillRound;
        samples?: SampleSource;
        sound?: boolean;
        summary?: DrillSummary;
        sx?: SxProps<Theme>;
        total: number;
    }
    Index

    Properties

    answerArea?: ReactNode

    For a question answered by playing (question.playAnswer): shown in place of the answer buttons — a panel that listens to the instrument and calls onAnswer with what was played and whether it was right. Without it, the question is answered by choosing, like any other

    children?: ReactNode

    Anything to show under the question — a hint, a replay button

    colors?: Partial<DrillColors>
    index: number

    The round's place, from 0

    labels?: Partial<DrillCardLabels>

    Supplies the notation engine for the staff

    The names answers are shown by: intervals, chords, scales and keys

    noteStyles?: ReadonlyMap<string, MusicXmlNoteStyle>

    For a question answered by playing, once it is: how the notes to play were played, as note styles for the staff — a colour per note and the note played in a wrong one's place — as a graded take's are drawn

    onAnswer: (choice: string, correct?: boolean) => void

    A choice was made — or, from answerArea, an answer played, with whether it was right

    onError?: (error: Error) => void

    Called when the staff fails to draw or the sound fails to start

    onFinish?: () => void

    End the drill early, keeping what was answered (useDrill's finish); the Finish button shows when given

    onNext: () => void

    Move on

    onSoundingChange?: (sounding: boolean) => void

    Told when the card starts and stops sounding notes — the question, its starting note — so a microphone listening for the answer can wait for the card to fall quiet

    round: DrillRound

    The round being asked

    samples?: SampleSource

    Recorded samples to play the question with — a piano, say — instead of the built-in voice; the question's notes are downloaded as it appears. The SDK ships none: you choose the host, and that set's licence applies

    sound?: boolean

    Play the question once a choice is made, with a button to hear it again (default: true). A question asked by ear (question.byEar) is played as it appears — after its reference note, when it has one — with its staff hidden until it is answered; with sound off, or where the browser has no Web Audio, it shows its staff like any other

    summary?: DrillSummary

    How the drill has gone so far (useDrill's summary): given, the card shows the running score and how far through the drill it is

    sx?: SxProps<Theme>
    total: number

    Questions in the drill