Riyaz: a keyboard tutor that speaks sargam
A practice app for my Casio keyboard. A Raspberry Pi reads every key over USB and a browser page teaches, listens and grades, in Indian sargam notation.

What it is
I’m learning the keyboard (a Casio CT-X9000IN), and wanted a teacher that thinks in sargam (Sa Re Ga Ma Pa Dha Ni) rather than staff notation. The keyboard connects over USB to a Raspberry Pi, where a small Python server reads every key press through the ALSA sequencer and streams it to a browser page. The page runs the lessons and grades my playing. It lives as a home-screen app on an old iPad mini.

How it teaches
- Practice waits for me at each step and names any wrong key (“that was komal Ga”).
- With metronome counts in, then grades the timing of every note (on the beat, close, loose, missed), says whether I rush or drag, and checks that long notes are held.
- Listen plays the lesson through the keyboard’s own speakers, lighting up the keys.
- Free play shows what I press in sargam and names the chords.
- A monitor shows a live waterfall of key presses, how hard and how long each was, and how even my touch is.
Every attempt is logged, so the next lessons can be planned around what actually goes wrong.

Stack: Python (ALSA sequencer via ctypes, server-sent events), JavaScript, Web Audio, Raspberry Pi 5. Vibe-coded with Claude Code.