Random Ear-Training Interval Exercise Generator

Generate ascending MIDI pitch pairs with separate equal-tempered frequencies and semitone answer intervals.

Description

An ear-training interval can be represented by two MIDI pitches and their equal-tempered frequencies.

An ear-training interval can be represented by two MIDI pitches and their equal-tempered frequencies. The interval size is the second pitch minus the first in semitones.

The tool returns result (generated result). These are generated fixtures or selected identifiers; the result does not replace the caller’s choice of repertoire, dataset or intended use.

When to use Random Ear-Training Interval Exercise Generator

Use Random Ear-Training Interval Exercise Generator when you already have exerciseCount, minimumMidi, maximumMidi, maximumInterval and want result. Use the generated prompts for practice and retain the supplied answers for checking the exercise.

How to use Random Ear-Training Interval Exercise Generator and understand its results

  1. Enter exerciseCount, minimumMidi, maximumMidi, maximumInterval using the field table below. Match the units, ordering and data boundaries described in the calculation.
  2. Run the tool after checking the stated bounds and matching paired observations or categories. A malformed request gives a tool error rather than a usable measurement.
  3. Read result. Use the calculation and interpretation below to distinguish amounts, ratios, signs and decision flags where applicable.
  4. Run again for another fixture. Preserve caller-supplied dataset metadata or separate exercise answers from prompts where present.
Input fieldMeaningValue type and boundsRequirement
exerciseCountExercise countinteger; minimum 1; maximum 64Required
minimumMidiMinimum MIDIinteger; minimum 0; maximum 127Required
maximumMidiMaximum MIDIinteger; minimum 0; maximum 127Required
maximumIntervalMaximum intervalinteger; minimum 0; maximum 24Required

Draw the first integer pitch within supplied MIDI bounds 0–127, then the second from first through min(maximumMidi,first+maximumInterval). Maximum interval is 0–24 and exercise count 1–64.

frequencyHz = 440×2^((midi−69)/12)

The symbols refer to the supplied quantities or generated values described above; unit conversions and comparison boundaries follow the stated implementation.

json
{
  "input": {
    "exerciseCount": 3,
    "minimumMidi": 60,
    "maximumMidi": 84,
    "maximumInterval": 12
  },
  "randomDraw": 0.25,
  "output": {
    "result": {
      "exercises": [
        {
          "firstFrequencyHertz": 369.9944227116344,
          "firstMidi": 66,
          "secondFrequencyHertz": 440,
          "secondMidi": 69,
          "semitones": 3
        },
        {
          "firstFrequencyHertz": 369.9944227116344,
          "firstMidi": 66,
          "secondFrequencyHertz": 440,
          "secondMidi": 69,
          "semitones": 3
        },
        {
          "firstFrequencyHertz": 369.9944227116344,
          "firstMidi": 66,
          "secondFrequencyHertz": 440,
          "secondMidi": 69,
          "semitones": 3
        }
      ]
    }
  }
}

Limitations and assumptions

Intervals are ascending or unison, and interval sizes are not globally uniform. No audio playback, melodic context or learner grading is produced.

Random draws use context.random when injected and otherwise Math.random. No seed input or cryptographic randomness guarantee is provided. Consumed draws must be finite and in [0,1); repeated runs can repeat results.

Alternative or Complementary methods

Random Arpeggio Generator: Generate timed MIDI notes from supplied chord intervals and return equal-tempered frequency metadata. Frequency From MIDI Calculator: Convert a MIDI note number to its equal-tempered frequency with A4 = 440 Hz.

Methodological background: Note names, MIDI numbers and frequencies.1

References

  1. Note names, MIDI numbers and frequencies — Joe Wolfe, University of New South Wales

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies