Show HN: Ear training using midi.js
I really like this, for the most part (and apropos, since the first day of teaching ear-training for the semester is tomorrow!).You're probably randomly generating these, but I would strongly suggest incorporating some voice-leading and standard syntax into the examples. When it plays I-IV-V-I to establish the key, for example, it plays 3 root-position triads with parallel voice-leading:    5 - 1 - 2 - 5
    3 - 6 - 7 - 3
    1 - 4 - 5 - 1

Usually when ear training, the idea is to be able to hear common tonal progressions, where this kind of voice leading almost never shows up. Something like this would be better (and better still with a bass voice playing the roots in a different octave):    5 - 6 - 5 - 5
    3 - 4 - 2 - 3
    1 - 1 - 7 - 1

I had trouble with the chord progression and melodic dictation exercises, since they're not common tonal progressions. The melodic dictation I tried first went ^6, up to ^5, down to ^1, and down again to ^3. While the minor seventh is a really common tonal interval, it's really uncommon to hear it from scale degree 6 in a major key up to scale degree 5 (you'd only really ever hear it as an applied chord of ii).Likewise, the first chord progression I tried went I - ii7 - ii - IV7. This is a progression you would not be likely to hear in tonal music (even in rock, jazz, and other modern genres). Once a chord gets a seventh (ii7), it doesn't usually lose it until its resolution (so ii7 to ii isn't a logical progression), and the progression ii to IV7 is a retrogression (at least in tonal classical music: this one you'd be slightly more likely to hear in rock perhaps, but I imagine it's still pretty rare).All this is to say that I really like the idea, but I'm hesitant to tell my students about it because the random generation might lead them to things which I would never play in an ear-training class (because they never show up in common-practice tonal music). The way around this , and the way I've done it before, is  to generate a bunch of scale-degree patterns or chord progression patterns and shuffle them randomly. If you're interested in developing this further I'd be happy to help come up with some of these. For intervals, scales, and individual chords, though, it's really great.