Svara Mirror
You sing. It names the scale — in your own key, entirely on your device.
The problem
A singer practising alone cannot easily tell which raga or scale they have drifted into, and ordinary tuners name piano notes rather than the singer’s own tonic. Teachers answer this by ear in a lesson; between lessons there was nothing.
Constraints
- Real time, on a phone, in a browser — no native app, no server round-trip.
- Privacy by construction: a singing voice must never be recorded or leave the device.
- It has to work for singers who are consistently a little flat or sharp, because most people are.
- The tonic is unknown; the tool must find Sa without being told.
The approach, in order
- /01
Captured audio through an AudioWorklet with browser noise processing disabled, so the raw voice reaches the analysis untouched.
- /02
Ran a custom pitch tracker in a Web Worker, emitting compact pitch “hops” so the interface stays smooth while analysis runs.
- /03
Found the tonic by weighting every note by how long the singer dwells on it, with extra weight for the notes phrases rest on — singers return home to Sa.
- /04
Ranked raga and scale candidates against the sung pitch classes, and when two are close, named the single note that settles the tie.
- /05
Tuned the reference to the singer rather than the piano, so a consistently flat voice still reads as the scale they meant.
- /06
Added a demo mode with a simulated voice so the tool can be understood before the microphone is granted.
What it does now
A singer hears their melody drawn as a live pitch trail, sees their Sa found automatically, and gets the raga or scale named in Carnatic or Western terms. For solo singing in a quiet room, note identification typically exceeds 95%.