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
- Enter exerciseCount, minimumMidi, maximumMidi, maximumInterval using the field table below. Match the units, ordering and data boundaries described in the calculation.
- 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.
- Read result. Use the calculation and interpretation below to distinguish amounts, ratios, signs and decision flags where applicable.
- Run again for another fixture. Preserve caller-supplied dataset metadata or separate exercise answers from prompts where present.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| exerciseCount | Exercise count | integer; minimum 1; maximum 64 | Required |
| minimumMidi | Minimum MIDI | integer; minimum 0; maximum 127 | Required |
| maximumMidi | Maximum MIDI | integer; minimum 0; maximum 127 | Required |
| maximumInterval | Maximum interval | integer; minimum 0; maximum 24 | Required |
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.
{
"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
-
Note names, MIDI numbers and frequencies — Joe Wolfe, University of New South Wales
Similar or alternative tools
- 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.