Inspiration

For the inexperienced learner, understanding the difference between different notes is very difficult, and by creating a software that can help identify different notes we are giving learners who may not have access to professional vocal or instrumental training, which develops a trained ear, the opportunity to develop the skills they need to succeed in music.

By bridging the gap between ancient musical tradition and modern technology, we’re making the beautiful complexity of Indian classical music accessible to everyone, regardless of their background, location, or resources. Our mission is to preserve the mathematical precision of this ancient art form while empowering the next generation of musicians with tools for success.

What it does

Swara Detector identifies the frequency/pitch of sounds and labels them according to the sargam system (Sa Re Ga ma Pa Dha Ni Sa scale) based on their proportions, since Indian music uses only one key, which in theory could be any note. It then displays the identified notes.

We created Swara Detector to democratize Indian classical music education. Our software provides real-time visual feedback that helps learners:

  • Identify precise swaras as they sing or play instruments
  • Understand pitch relationships between different notes
  • Develop auditory skills through immediate, objective feedback
  • Practice effectively without constant supervision

This tool is particularly transformative for:

  • Self-taught musicians seeking structured feedback
  • Students in remote areas with limited access to gurus
  • Educational institutions looking to supplement traditional teaching
  • Music enthusiasts exploring Indian classical music for the first time

How we built it

Architecture Overview Swara Detector is built as a client-side React application that processes audio entirely in the browser, ensuring low latency and privacy since no audio data leaves the user's device.

Tech Stack

  • React - Frontend framework
  • Web Audio API - Real-time audio processing
  • CSS3 - Styling and responsive design
  • JavaScript (ES6+) - Application logic
  • Vercel - Deployment platform

Challenges we ran into

We struggled to achieve high accuracy in detecting swaras, which was expected given the many variations in notes. A fundamental challenge was that Indian classical music uses relative pitch rather than the fixed frequencies of Western music. While Western notes have standardized frequencies, Indian swaras are entirely relative to the performer's base Sa.

This required us to design a unique system where users input their base frequency, and all other swaras are calculated as mathematical ratios from that foundation. We pushed past these obstacles by leveraging the pitch perception skills of the musicians on our team to refine our detection algorithms and validate our ratio-based approach.

Accomplishments that we're proud of

Technical Breakthroughs We built a real-time pitch detection engine from scratch using Web Audio API, capable of processing live audio with millisecond latency. We faithfully implemented the ancient swara ratio system with modern JavaScript and created a responsive Canvas graph that displays pitch movement with professional-grade performance.

Innovation & Impact We successfully merged centuries-old Indian classical music theory with cutting-edge web technology. Our tool makes advanced musical training accessible to learners at all levels.

Technical Excellence We built our entire signal processing pipeline without relying on external libraries and achieved smooth 60fps visualization while processing complex audio data directly in the browser.

User Experience Achievements We transformed complex signal processing into a beautiful, easy-to-use interface where users can see their pitch accuracy improving in real-time through instant visual feedback.

What Makes This Special We created something that actually works for its intended purpose. Watching the system correctly identify swaras as someone sings, seeing the visual feedback when they hit the right notes, validates our hard work and proves we've built something truly valuable for music education.

From struggling with FFT arrays to achieving flawless swara detection, every breakthrough moment is etched in our memory!

What we learned

Technical Deep Dives We mastered the Web Audio API, progressing from basic audio contexts to complex real-time signal processing pipelines. We learned to implement FFT-based pitch detection and handle the complexities of vocal harmonics. We optimized React performance to manage state updates without blocking the main thread during audio processing, and created smooth Canvas animations that respond instantly to user input.

The Mathematics of Music We discovered why Indian classical music requires precise mathematical ratios rather than equal spacing, learning the ancient relationships that define each note. Through testing, we found that the human voice requires ±5% tolerance for practical swara recognition.

Cross-Disciplinary Insights We bridged music theory and code by translating abstract musical concepts into concrete algorithms. We designed interfaces that teach while they measure, and learned to respect traditional knowledge while building modern tools.

Most Valuable Lesson We learned that the hardest problems often have the most elegant solutions. What started as a complex signal processing challenge became a beautiful intersection of mathematics, music, and human-computer interaction, proving that technology can enhance tradition without diminishing it.

What's next for Swara Detector

Enhanced Raga Intelligence In the future, we plan to add raga recognition using a Markov chain-based machine learning model that analyzes note sequences and patterns. This will enable the system to identify which raga you're practicing in real-time, provide feedback on raga-specific rules and phrasing, and detect common mistakes in raga progression.

Integrated Practice Environment We'll integrate a digital Tanpura and Tabla for a natural pitch reference and rhythmic accompaniment during practice. This includes customizable drone settings with Sa-Pa or Sa-Ma combinations, multiple tempo options for different compositions, and real-time rhythm synchronization to enhance practice sessions.

Share this project:

Updates