API / MusicTheory.Training
MelodyDrill class
A reproducible melodic-dictation drill: the same options and seed replay the same questions.
Constructors
MelodyDrill(MelodyDrillOptions options, UInt64 seed)Creates a drill. Throws
ArgumentException for a length below 2, no steps, or a step of 0 or beyond an octave.Methods
AnswerResult<IReadOnlyList<Note>> Check(Question<IReadOnlyList<Note>> question, IReadOnlyList<Note> given)Scores each note by ear (same
Note.MidiNumber, so enharmonic spellings count; the octave matters). The score is the right notes over the answer length.Question<IReadOnlyList<Note>> Next()The next question. Draw order (a public contract): mode, tonic, then one step per drawn note after the first; the last note is not drawn when the options end on the tonic.