posted an update —

As we complete one year since the ideation of this project, here are some updates!

TL;DR

  • Digital Tanpura is here! As promised earlier, I have integrated a fully synthesized, browser-native digital Tanpura into the project. It features traditional 4-string acoustic tuning (Pa–Sa–Sa–Sa and Ma–Sa–Sa–Sa), continuous drone synthesis, and live sync with the pitch detector.

  • Introducing Ragas for Right Now! You can now discover which ragas are traditionally associated with the current time of day (the Prahar system), along with the moods they are believed to evoke, and listen to classical renditions with a single click.


Under the Hood (For the Tech & Music Geeks)

For those curious about how this was built without relying on heavy recorded audio samples or a backend server:

  • Pure Browser Audio Synthesis (Zero Samples): The Tanpura runs entirely on the Web Audio API. Rather than looping static MP3s, every pluck is synthesized in real time using custom Fourier-series PeriodicWave tables that model the rich harmonic overtone profile of steel and bronze strings.

  • Authentic 4-String Acoustic Tuning: Instead of a generic chord, the engine faithfully implements traditional Indian classical tuning: Mandra Pa/Ma (lower 5th/4th at 0.75× or 0.667×) → Jodi Madhya Sa (1.0×) → Jodi Madhya Sa (1.0×) → Kharja Mandra Sa (deep lower root at 0.5×). The Kharja string is dynamically given extra sustain and acoustic body to ground the singer.

  • Jivari Bridge Physics Simulation: The iconic buzzing shimmer of a Tanpura’s bone bridge and cotton thread (jivari) is simulated using dual detuned oscillators combined with a dynamic resonant BiquadFilterNode sweep on each attack. The detuning uses a proportional pitch multiplier (Δf = f × multiplier) so the acoustic chorus rate scales naturally whether you're singing at 100 Hz bass or 400 Hz soprano.

  • Audio-Clock Lookahead Scheduler: Precise timing is decoupled from JavaScript's main thread and setInterval jitter. A lightweight lookahead scheduler queues plucks directly onto the Web Audio hardware clock (audioCtx.currentTime), allowing live tempo, volume, and tonic changes without gaps or audible clicks.

  • The 8-Prahar Time Engine: "Ragas for Right Now" divides the 24-hour day into the 8 traditional Indian classical Prahars (including late-night midnight wrapping), algorithmically matching your local clock to 30 curated ragas and their emotional rasas.


With the everlasting grace of the ever-compassionate Maa Saraswati, I have been fortunate enough to learn so much about classical music over the past year. The project originally started as an effort to develop a system that could detect ragas. So, it would not be wrong to say that even though the project is called Swara Detector, the raga remains its ultimate focus.

Over the last year, I embarked on a journey to explore and understand ragas. And if you know me well enough, it might surprise you just how much I discovered.

To begin with, we know that ragas can profoundly influence our moods and emotional experiences. I wanted to explore this for myself, and I genuinely experienced it firsthand while experimenting.

To be frank, my primary motivation was to explore whether classical music could help people struggling with mental health challenges. This eventually led me to integrate the concept of Raga Chikitsa (Music Therapy) into one of my other projects, ManasCare.

Of course, I am still learning, and I would love to explore this connection more rigorously. There is a lot to understand about the relationship between music, the mind, and well-being, and I believe this is an area worth investigating.

Additionally, I discovered something about ragas that I had never encountered before.

If we are close, you might know that I am quite enthusiastic about astrology, as you may have guessed from another one of my projects, AstroBot.

During my exploration, I came across the concept of using ragas to influence planetary energies in Vedic astrology. Some spiritual interpretations connect specific ragas with the body’s subtle energy centers, or chakras, and associate them with particular planetary qualities.

I started experimenting with these ideas myself, and the experiences were fascinating. Of course, I would like to understand these connections much more deeply before drawing any definitive conclusions.

But why am I sharing all this?

Because these discoveries have motivated me to continue working on Swara Detector, even though I still have a lot to learn about the domain. I might hopefully explore all these concepts in the future updates of Swara Detector.

Ultimately, I want this project to have the potential to benefit people. It can certainly help aspiring musicians learn and explore Indian classical music, but could it also contribute to our understanding of music’s relationship with mental well-being?

I genuinely hope so.

I know there is a long way to go, and I do not want to make promises I cannot yet substantiate. Nevertheless, the possibility alone gives me a reason to keep exploring.

Another source of motivation has been the surprisingly encouraging analytics this project has received so far. Knowing that people are finding it interesting makes me want to continue building it.

When will you hear from the Swara Detector again?

Right now, I am working on what is easily one of the most complex projects I have ever undertaken. Swara Detector deserves my undivided attention, and I would rather take my time than rush out something that does not meet my expectations.

Lastly, I am incredibly grateful to have had the opportunity to explore this art form. I never imagined I would become so interested in it, but here we are!

I dare say Indian classical music is the language of the Gods.

Or perhaps the language of the Gods comes second to mathematics. ;)

And now, for a little personal update.

If you have not guessed by now, I am trying to take up a new hobby.

That hobby is writing.

Shameless plug: I will be writing about all sorts of things here, mostly nerdy academic stuff: writing.sumitk.me.

I might also write in greater detail about some of my discoveries while exploring music, including the fascinating relationship between music and Fibonacci numbers. That last one is probably my favorite.

Thank you for reading!

And please, share your feedback on Swara Detector. I really need it!

Log in or sign up for Devpost to join the conversation.