TaalTrainer

A local tabla-inspired rhythm practice tool with thirteen synthesized strokes, four practice loops, twelve call-and-response lessons and a notation recorder. It uses no audio samples, accounts, analytics or external runtime libraries.

Run

Use Node 22 or newer for tests. Serve the project over HTTP; opening the HTML through a file URL is not supported because ES modules and AudioWorklets require an appropriate origin.

python3 -m http.server 8080
npm test
npm run test:coverage

Open http://localhost:8080. Sound starts after a user gesture. A supported browser must provide Web Audio and AudioWorklet, normally on localhost or HTTPS.

What ships

  • Thirteen keyboard strokes, including compound two-hand sounds and the tirakita roll, synthesized by three AudioWorklet families.
  • Teentaal, Keherwa, Dadra and an explicitly labelled Ektaal-inspired adaptation; loop tempo ranges from 40 to 240 BPM.
  • Twelve lessons with a four-beat count-in, a complete call, and a response window scaled to the entire phrase. Scoring uses a tempo-derived 55 to 140 ms tolerance.
  • Recorder notation and replay at the tempo captured when recording started. Takes are bounded to five minutes or 2,048 strokes.
  • Cancellable lesson/replay timers, stale-callback guards, retryable audio initialization and bounded numerical/allocation inputs.

Architecture and verification

The js/engine modules have pure data, clocks, scoring, notation, practice timelines, and owned timers. The js/audio modules have the audio graph, lookahead scheduler, and sample-level synthesis. The js/app.js module has ownership of the interface and transport state.

The offline test suite has 154 tests that include native-worklet shaped clock regression tests, DSP, queued voice preservation, long loop scheduling, cancellation, and the 12 practice timelines. Shared headless Chromium tests in the sibling reward pipeline run the actual app, find nonzero Web Audio signal, use a long response and cancellation, and check phone/desktop overflow. See ENGINEERING.md for commands and limitations.

These are automated tests, not listening or playtests by humans. Waveform observation is evidence of browser software, not speaker output or music quality. The accompanying thekas are practice versions; the twelve-beat Ektaal-inspired loop is an unofficial transcription. There is no claim to a teacher, partner, school, or human test network here.

While changes in speed preserve the mathematical phase, the already queued audio plays in its own time. Deferred background events skip the missed beats but do not replay the backlogged beats. The scores take into consideration the deterministic matching algorithm employed by these algorithms and does not indicate musical skill.

Authorship and release

This is AI assisted software. These files make no claim on human work hours, contest entry, implementation or rewards. A new contest would require all-new work during the development period, not this software as new work.

MIT License. Copyright (c) 2026 Aariv Patel.

Built With

Share this project:

Updates