This Demonstration implements a simple tool for learning to recognize musical intervals by ear. Each time you press the "new random interval" button, two randomly chosen notes are played, one after the other, and then together. While trying to guess its name, you can replay the interval repeatedly using the "replay" button. After making a guess (or giving up), you can see the correct interval name ("show/hide name").
The panel at the bottom allows you to sample the full set of intervals (within a single octave span), all with the same root note as the current randomly generated interval; this may be convenient for learning to distinguish between similar-sounding intervals or after an incorrect guess is made.
The controls allow you to modify the attributes of the sounds produced (instrument type, duration of notes), the octave range over which notes are selected, and the pitch order (ascending or descending). There is also the option to display interval names by default when first played (i.e. to "cheat").