Hiyve Components - v1.0.0
    Preparing search index...
    • The settings of a theory drill, as a form: which drill — notes, intervals, chords, key signatures or scales — and that drill's options, with the clef, the choices and the questions shared by all. The settings of every drill are kept, so switching back finds them as they were; a change of clef, asking by ear or answering by playing moves them all — key signatures are read, so the by-ear switch leaves them be and is not shown for them. Answered by playing, there are no choices to count. The drill itself is made by the page that owns them.

      Parameters

      Returns Element

      const [settings, setSettings] = useState(defaultTheoryDrillSettings);
      const [length, setLength] = useState(10);
      <TheoryDrillPanel settings={settings} onChange={setSettings} length={length} onLengthChange={setLength} onStart={() => setSeed(newSeed())} />
      const drill = useDrill({ generate: (random) => generateTheoryQuestion(settings, random), length, seed });