Hiyve Components - v1.0.0
    Preparing search index...
    • A theory drill round answered on an instrument. It is DrillCard from @hiyve/react-music-theory — what to play, the note given to start from — with a panel in place of the answer buttons that listens, through the microphone or a MIDI instrument, with the same note following as a practice take. Each note fills in right or wrong as it is played; once every note has been heard, the round is answered — onAnswer gets what was played and whether it was right — and the staff shows the notes to play marked as a graded take is: each coloured by how it was played, with the note played in a wrong one's place drawn beside it. Listening waits while the card sounds, so the microphone never hears the card. A question not answered by playing is shown as DrillCard shows it, with its answer buttons.

      Parameters

      Returns Element

      import { PlayDrillCard } from '@hiyve/react-music-performance/theory';

      const settings = withPlayAnswer(defaultTheoryDrillSettings, true);
      const drill = useDrill({ generate: (random) => generateTheoryQuestion(settings, random), length: 10, seed });
      {drill.round && (
      <PlayDrillCard round={drill.round} index={drill.index} total={drill.total} summary={drill.summary}
      loadEngine={loadEngine} onAnswer={drill.answer} onNext={drill.next} source="midi" />
      )}