A desktop ear training application built with Electron and TypeScript. Practice identifying notes, chords, scale degrees, and chord inversions across all major keys and modal scales, with built-in audio synthesis and MIDI output support.
- Play random notes from diatonic, chromatic, pentatonic, or blues scales
- Choose any of the 15 major keys
- Control note count (1–8 notes) and octave range
- Play notes sequentially or simultaneously
- Guess the key signature from what you hear
- Generate diatonic chords across all 7 modes (Ionian through Locrian)
- Practice triads and seventh chords (maj7, min7, dom7, min7b5)
- All chord inversions: root position, 1st, 2nd, and 3rd inversion
- Identify chord degree (I–vii°) and full characteristics (key, mode, degree, inversion)
- Focused guessing screen that hides note names until after your guess
- Simple mode: pick the key or chord degree from a button grid
- Detailed mode: identify all characteristics at once (key, mode, degree, inversion)
- Score tracking with running accuracy percentage
- Built-in synthesis via Tone.js
- Web MIDI API integration — route output to any connected MIDI device or virtual port
- Random velocity on MIDI notes for natural playback feel
npm install
npm run devTo build without launching:
npm run build- Select an exercise type: Notes or Chords
- Configure the key, scale/mode, note count, octave, and inversion options
- Click Play Notes and listen
- Use the guess buttons (or the detailed form) to identify what you heard
- Click Start Guessing Game for a focused, distraction-free practice session
Connect a MIDI device or start a virtual MIDI port (e.g. loopMIDI on Windows, IAC Driver on macOS), then click Refresh MIDI to populate the device list. When a MIDI device is selected, audio synthesis is bypassed and notes are sent as MIDI instead.
src/
main.ts # Electron main process
renderer.ts # Core EarTrainer class and main UI
chords.ts # ChordGenerator — standalone chord generation engine
types.ts # Shared TypeScript types
utils.ts # Shared utility functions
note-game.ts # Note guessing game logic
note-game-settings.ts # Note game settings screen
chord-game.ts # Chord guessing game logic
chord-game-settings.ts# Chord game settings screen
settings.ts # Global settings
sandbox.ts # Development sandbox
index.html # Main application UI
styles.css # Application styles
docs/
ui-design.md # UI/UX design guidelines
| Dependency | Purpose |
|---|---|
| Electron | Desktop application shell |
| TypeScript | Type-safe JavaScript |
| Tone.js | Web Audio synthesis |
| Web MIDI API | MIDI device I/O |
ISC