Back to Insights
audio engineering

Understanding Komal and Shuddh Swaras on a Virtual Harmonium Keyboard

2026-06-07
35 min read
Understanding Komal and Shuddh Swaras on a Virtual Harmonium Keyboard
Engineering Resource
Engineering Digest

Master the distinctions between Komal (flat) and Shuddh (natural) swaras on an online virtual harmonium keyboard. A comprehensive guide to classical key mapping and offline synthesis.

An octave in Indian classical music contains 12 swaras: 7 Shuddh (natural), 4 Komal (flat), and 1 Tivra (sharp).
Komal swaras are tuned exactly one semitone lower than their Shuddh counterparts, creating distinct emotional textures.
A virtual harmonium enables transposition of the relative tonic (Sa) across all 12 keys, simplifying QWERTY keyboard training.
MojoDocs uses native browser Web Audio API to synthesize harmonium brass reed tones locally with sub-5ms latency.
Content Roadmap

Indian classical music is built on a rich modal system where melody reigns supreme. Unlike Western classical music, which relies heavily on polyphony and shifting chord progressions, Hindustani and Carnatic traditions focus on the vertical exploration of single-note intervals relative to a fixed tonic. In Hindustani classical music, this interval system is defined by twelve basic notes within a single octave. Understanding the classification of these notes into Shuddh (natural) and Komal (flat) swaras is the first major step for any student of the keyboard, harmonium, or vocals.

Historically, learning these intervals required access to a physical hand-pumped harmonium. However, high-quality harmoniums are heavy, delicate, and sensitive to environmental changes. Tuning physical brass reeds is a specialized skill that must be carried out by professionals. In the digital age, the web-based virtual harmonium provides an alternative. By using the browser-s native Web Audio API, students can practice scales, understand notes, and perform ragas on their laptops or mobile devices. This technical guide explains the musicology of Komal and Shuddh swaras, demonstrates how they are mapped onto a virtual keyboard, discusses the acoustics of reed synthesis, and analyzes the cost savings of local-first digital practice.

The Musical Foundation: Shruti and Swara in Hindustani Music

To understand the difference between Komal and Shuddh swaras, we must first examine the concept of pitch intervals in Indian classical music. The musical system divides an octave, known as a Saptak, into 22 microtonal intervals called Shrutis. A Shruti is the smallest interval of pitch that the human ear can easily distinguish and that a trained singer can reliably produce. While ancient texts detail the musical values of all 22 Shrutis, practical performance focuses on twelve major intervals. These twelve intervals are called Swaras.

The seven primary swaras, representing the natural notes of the scale, are known as Shuddh Swaras. These notes correspond to the Sanskrit names:

  • Shadja (Sa) — The fundamental tonic note, equivalent to the Western "Do".
  • Rishabh (Re) — The second note, equivalent to "Re".
  • Gandhar (Ga) — The third note, equivalent to "Mi".
  • Madhyam (Ma) — The fourth note, equivalent to "Fa".
  • Pancham (Pa) — The fifth note, equivalent to "Sol".
  • Dhaivat (Dha) — The sixth note, equivalent to "La".
  • Nishad (Ni) — The seventh note, equivalent to "Ti".

Of these seven Shuddh swaras, two are defined as constant or immovable. These are Sa and Pa. They are referred to as Achala Swaras. They form the stable structural frame of any raga and have no flat or sharp variations. The remaining five notes (Re, Ga, Ma, Dha, Ni) are movable, or Chala Swaras. Depending on the raga being performed, their pitch can be altered:

  • Komal Swaras: When Re, Ga, Dha, or Ni are lowered by one semitone, they become Komal (flat) swaras.
  • Tivra Swaras: When Madhyam (Ma) is raised by one semitone, it becomes Tivra (sharp) Ma.

This creates a total of twelve notes in a single Saptak: 2 Achala swaras (Sa, Pa), 5 Shuddh Chala swaras (Re, Ga, Ma, Dha, Ni), 4 Komal swaras (Komal Re, Komal Ga, Komal Dha, Komal Ni), and 1 Tivra swara (Tivra Ma).

The Acoustic Differences: Shuddh vs. Komal Swaras

The transition from a Shuddh swara to a Komal swara is a shift of exactly one semitone (a half-step in Western music). For example, if Sa is set to a frequency of 240 Hz (roughly C4 on a piano), the frequencies of the surrounding notes are calculated based on mathematical ratios rather than equal temperament. In traditional Indian music, tuning is based on Shadja-Pancham Bhav (consonance of the fifth) and Shadja-Madhyam Bhav (consonance of the fourth), which align closely with Just Intonation.

When searching for a komal swara online, beginners often struggle to identify the correct frequency relationships. The following breakdown shows the differences between natural (Shuddh) and flat (Komal) notes when C is used as the tonic (Sa):

  • Shuddh Re vs. Komal Re: Shuddh Re (D) has a frequency ratio of 9/8 relative to Sa. Komal Re (C# or Db) is lowered by a semitone, with a frequency ratio of 16/15 (or 256/243 depending on the raga). This creates a close, tense relationship with the tonic Sa.
  • Shuddh Ga vs. Komal Ga: Shuddh Ga (E) has a ratio of 5/4. Komal Ga (D# or Eb) has a ratio of 6/5. The Komal Ga interval is crucial in minor scales, conveying feelings of sadness, longing, or devotion.
  • Shuddh Dha vs. Komal Dha: Shuddh Dha (A) has a ratio of 5/3. Komal Dha (G# or Ab) has a ratio of 8/5. In ragas like Bhairav, the sliding movement between Komal Dha and Pa is a key melodic feature.
  • Shuddh Ni vs. Komal Ni: Shuddh Ni (B) has a ratio of 15/8, functioning as the leading tone that resolves back to the high octave Sa. Komal Ni (A# or Bb) has a ratio of 9/5 or 16/9, providing a softer transition to the octave note.

Understanding these frequency differences is essential because the expressive power of a raga depends on the precise tuning of these notes. A physical harmonium uses individual brass reeds that are hand-filed to achieve these ratios. A virtual keyboard must replicate these frequencies digitally, giving players the flexibility to practice and hear these intervals accurately.

The Visual Mapping: Shuddh Swara Keyboard Layout

On a physical keyboard or harmonium, the keys are arranged in a repeating pattern of white and black keys. When playing Western music, the white keys are natural notes (C, D, E, F, G, A, B) and the black keys are sharps/flats (C#, D#, F#, G#, A#). However, in Indian classical music, the scale is relative. This means you can choose any key on the keyboard as your fundamental Sa.

If you choose a white key like C as Sa, the layout maps as follows:

  • White Keys: Sa (C), Shuddh Re (D), Shuddh Ga (E), Shuddh Ma (F), Pa (G), Shuddh Dha (A), Shuddh Ni (B).
  • Black Keys: Komal Re (C#), Komal Ga (D#), Tivra Ma (F#), Komal Dha (G#), Komal Ni (A#).

This layout is often used by beginners because the physical separation matches the musical classification: natural notes are white, and flat/sharp notes are black. However, if a vocalist prefers to sing in a different key, such as C# (a common pitch for male singers in India), the mapping changes. In this configuration, C# becomes the new Sa. The white and black keys then take on new roles:

  • Sa: C# (Black Key)
  • Komal Re: D (White Key)
  • Shuddh Re: D# (Black Key)
  • Komal Ga: E (White Key)
  • Shuddh Ga: F (White Key)
  • Shuddh Ma: F# (Black Key)
  • Tivra Ma: G (White Key)
  • Pa: G# (Black Key)
  • Komal Dha: A (White Key)
  • Shuddh Dha: A# (Black Key)
  • Komal Ni: B (White Key)
  • Shuddh Ni: C (White Key)

This relative shifting explains the difference between komal shuddh harmonium configurations. A physical harmonium player must learn to visualize the scale shapes from different starting keys. This requires years of practice. A virtual harmonium keyboard simplifies this by providing a transpose function. By shifting the digital root key, the player can use the same physical QWERTY key patterns while the software handles the frequency conversion.

Mapping the Virtual Harmonium to QWERTY Keys

To play the virtual harmonium using a computer keyboard, the physical keys of the QWERTY layout must be mapped to the musical notes. The MojoDocs Web Harmonium uses a two-octave layout that maps the home row keys to the white keys (natural notes) and the top row keys to the black keys (sharps and flats).

Below is the default configuration with C set as the tonic (Sa):

QWERTY Key Musical Note (Swara) Western Pitch (Sa = C) Type of Swara
A Sa (Shadja) C4 Achala (Immovable)
W Komal Re (Flat Rishabh) C#4 Komal (Flat)
S Shuddh Re (Natural Rishabh) D4 Shuddh (Natural)
E Komal Ga (Flat Gandhar) D#4 Komal (Flat)
D Shuddh Ga (Natural Gandhar) E4 Shuddh (Natural)
F Shuddh Ma (Natural Madhyam) F4 Shuddh (Natural)
T Tivra Ma (Sharp Madhyam) F#4 Tivra (Sharp)
G Pa (Pancham) G4 Achala (Immovable)
Y Komal Dha (Flat Dhaivat) G#4 Komal (Flat)
H Shuddh Dha (Natural Dhaivat) A4 Shuddh (Natural)
U Komal Ni (Flat Nishad) A#4 Komal (Flat)
J Shuddh Ni (Natural Nishad) B4 Shuddh (Natural)
K Tar Sa (High Octave Shadja) C5 Achala (Immovable)

Using this layout, you can practice scales by playing keys in sequence. For instance, playing the home row keys A-S-D-F-G-H-J-K produces a Shuddh scale (equivalent to C Major). To introduce Komal swaras, you replace the home row keys with their corresponding top row keys (e.g., swapping S for W to play Komal Re, or D for E to play Komal Ga).

Pro Tip: When using the QWERTY layout, position your fingers on the home row keys (A, S, D, F). Use your index and middle fingers to reach up to the top row keys (W, E, T, Y, U) for Komal and Tivra swaras. This technique keeps your hand stable and helps develop muscle memory for faster passages.

The Technical Architecture of Web Harmonium Synthesis

Replicating the acoustic properties of a physical harmonium in a web browser requires real-time sound synthesis. Traditional web applications played pre-recorded MP3 samples when a key was pressed. While simple to implement, sample playback has limitations:

  • Latency: Requesting and decoding audio files in the browser introduces a delay of 100 to 250 milliseconds. This latency makes it difficult to play in time with a rhythm.
  • Pitch Bending: Standard sample playback cannot simulate the continuous pitch bends (Meend) or microtonal adjustments (Shrutis) that are essential in Indian music.
  • File Size: High-quality samples for every key, note length, and volume level require downloading megabytes of audio data, which increases loading times.

The MojoDocs Web Harmonium uses the browser's native Web Audio API to synthesize sound in real time on the client side. The audio engine is built around a network of audio processing nodes:

  • Oscillator Nodes: Instead of simple sine waves, the engine combines sawtooth and square waves to replicate the complex, harmonic-rich sound of physical brass reeds.
  • Biquad Filter Nodes: A low-pass filter is used to roll off harsh high frequencies above 2000 Hz, giving the digital tone a warmer, wood-like quality similar to a physical harmonium cabinet.
  • Gain Nodes: An ADSR (Attack, Decay, Sustain, Release) envelope shapes the volume of the note:
    • Attack (5-10ms): Simulates the time it takes for air to enter the reed chamber.
    • Decay (15ms): A slight volume reduction as the air pressure stabilizes.
    • Sustain: Holds the note at a constant volume as long as the QWERTY key is held down.
    • Release (80-120ms): A quick fade-out simulating the closing of the wooden key valve.
Because these calculations are handled by the browser's compiled audio thread, latency is kept under 5 milliseconds. This provides a responsive playing experience, allowing students to practice fast passages without lag.

Economics of Riyaz: Physical Instruments vs. MojoDocs

Developing proficiency in Hindustani classical music requires regular practice, or Riyaz. Traditionally, this required a large upfront investment. High-quality physical harmoniums — particularly scale-changers made from teak wood — are expensive. In addition, the brass reeds are sensitive to temperature and humidity. The seasonal shifts in temperature across India can cause the brass to expand or contract, detuning the instrument and requiring professional tuning twice a year.

Digital alternatives like software synthesizers or VST plugins also carry costs. Many require purchasing expensive hardware hosts or paying monthly subscriptions. In contrast, MojoDocs provides a free, browser-based harmonium that runs entirely on your local device. This eliminates the financial barrier to entry, allowing students to access a tuned instrument without ongoing maintenance costs.

Method Cost Privacy
Physical Scale-Changer Harmonium ₹18,000 - ₹40,000 upfront + ₹3,000/year tuning fees 100% Offline (Analog) but subject to wear and detuning
Cloud-Based Software / Synth Apps ₹5,000 - ₹12,000/year subscription plans Poor (Requires active internet connection, tracks user telemetry)
MojoDocs Web Harmonium ₹0 (Free, local-first engine) 100% Secure (Zero-data upload, works entirely offline)

By eliminating subscription costs and the need for regular tuning, web-based local-first applications lower the financial barrier to studying music. Students can practice with a calibrated, zero-latency instrument without investing in hardware or software licenses.

Data Sovereignty and Client-Side Security in Music Software

Data privacy is an important consideration when using digital tools. Many modern music applications upload user keystrokes, practice times, and microphone audio to remote servers. This telemetry is often used to train machine learning models or build commercial user profiles. This poses a privacy risk for singers and instrumentalists, who may not want their practice sessions or vocal profiles recorded and stored in the cloud.

This risk is similar to the privacy concerns surrounding official identification documents. In India, documents like driving licenses on the Parivahan portal, Aadhaar details from UIDAI, PAN cards from NSDL, or passports from the Ministry of External Affairs (MEA) contain sensitive biometric and personal information. Users expect these documents to be handled securely without exposure to third-party trackers. The same standard of privacy should apply to creative workspaces.

The MojoDocs Web Harmonium is built on a local-first architecture to address these privacy concerns. Using the browser's native Web Audio API, the sound synthesis is performed entirely on your device. When you press a key, the browser's audio engine generates the sound waves in real time without sending data back to a server. You can verify this local-first behavior by testing the application offline.

The Flight Mode Verification

1. Open MojoDocs. 2. Turn off WiFi/Internet. 3. Process the file. 4. It completes instantly without any data leaving your device.

This design ensures your practice sessions remain private. Because no audio data is transmitted, the application is also free from network latency, allowing for responsive playing even on slower devices.

Practical Raga Walkthroughs on the Virtual Keyboard

To help you practice Komal and Shuddh swaras, let's explore three foundational ragas on the virtual keyboard. For each raga, we will define the scale, map the keys, and walk through the ascending (Aaroh) and descending (Avroh) patterns.

1. Raag Bhairav: The Morning Scale

Raag Bhairav is a classic morning raga known for its serious, contemplative mood. It uses two Komal swaras — Komal Re and Komal Dha — while the remaining notes are Shuddh.

  • Swaras: Sa, Komal Re, Shuddh Ga, Shuddh Ma, Pa, Komal Dha, Shuddh Ni, Tar Sa.
  • Aaroh (Ascending): C → Db → E → F → G → Ab → B → C
  • QWERTY Keys: AWDFGYJK
  • Avroh (Descending): C → B → Ab → G → F → E → Db → A
  • QWERTY Keys: KJYGFDWA

2. Raag Bhairavi: The Universal Scale

Raag Bhairavi is a versatile raga that uses all four Komal swaras: Komal Re, Komal Ga, Komal Dha, and Komal Ni. It is often played at the conclusion of classical concerts to create a peaceful, devotional atmosphere.

  • Swaras: Sa, Komal Re, Komal Ga, Shuddh Ma, Pa, Komal Dha, Komal Ni, Tar Sa.
  • Aaroh (Ascending): C → Db → Eb → F → G → Ab → Bb → C
  • QWERTY Keys: AWEFGYUK
  • Avroh (Descending): C → Bb → Ab → G → F → Eb → Db → A
  • QWERTY Keys: KUYGFEWA

3. Raag Yaman: The Evening Scale

Raag Yaman is a primary evening raga that uses all Shuddh swaras, with the exception of Madhyam, which is raised to Tivra Ma. It is one of the first ragas taught to students due to its clear structure.

  • Swaras: Sa, Shuddh Re, Shuddh Ga, Tivra Ma, Pa, Shuddh Dha, Shuddh Ni, Tar Sa.
  • Aaroh (Ascending): C → D → E → F# → G → A → B → C
  • QWERTY Keys: ASDTGHJK
  • Avroh (Descending): C → B → A → G → F# → E → D → A
  • QWERTY Keys: KJHGTDSA

Setting Up Your Riyaz Environment for Best Performance

To optimize your practice sessions, it is helpful to set up your environment to support focused study. Here are a few tips:

  • Minimize Latency: Use wired headphones or external speakers. Wireless Bluetooth headphones can introduce audio delay, which interferes with your timing.
  • Print Your Sheets: Keep printed chord sheets or scale guides on your desk. You can use services like Blinkit print stores or visit local Xerox/Cyber Cafes to print these materials, keeping your screen clear for the virtual keyboard.
  • Stay Hydrated: Keep water or tea nearby. You can use services like Zepto or Swiggy Instamart to order refreshments directly to your space to avoid interruptions.
  • Secure Your Session: Verify that the application is running offline. By using a local-first interface, you can practice with the assurance that your audio and keystrokes are not being uploaded to external servers.

Advanced Scale-Changer Simulation and Transposition

One of the most complex variations of the physical harmonium is the scale-changer harmonium. On a standard harmonium, the keyboard is fixed, meaning that if you want to play a song in a different pitch, you must change your finger fingerings entirely. A scale-changer harmonium allows the player to physically slide the keyboard mechanism left or right relative to the reeds. This means the player can use the same finger movements to play in different keys.

A virtual harmonium replicates this mechanical function digitally. Using the browser's Web Audio API, the transposition feature shifts the output frequencies of the oscillator nodes without changing the physical key mapping. For example, if you set the transpose value to +1, pressing the A key (traditionally Sa/C) will trigger the frequency for C# (256 Hz). The entire scale is shifted up by one semitone, allowing you to play in the vocalist's preferred key while keeping your fingers on the familiar home row keys.

This digital implementation offers several advantages:

  • Mechanical Reliability: Physical scale-changer mechanisms are complex, heavy, and prone to air leaks if the sliding seals wear out. A digital shift has no moving parts and does not wear over time.
  • Instant Shifting: Transposition is immediate, allowing you to change keys mid-session without stopping to adjust mechanical levers.
  • Custom Tuning: Digital engines can be adjusted to specific temperaments, enabling students to experiment with both equal temperament and historical just intonation scales.

For more detailed guides on accompanying vocalists, you can read our tutorial on Web Harmonium configurations. Playing regularly with these tools helps build the finger dexterity and ear training necessary to master classical music.

Conclusion: Digital Tools in Classical Music Practice

The transition from traditional wood-and-brass instruments to browser-based applications makes music education more accessible. By combining the Web Audio API with a local-first design, MojoDocs provides a zero-latency virtual harmonium that allows students to practice scales, learn the differences between Komal and Shuddh swaras, and accompany vocalists without the need for expensive hardware or subscriptions.

Whether you are a beginner learning your first scales or an experienced vocalist looking for a portable pitch reference, the virtual harmonium offers a convenient solution. By running entirely on the client side, the application ensures your practice sessions remain private, secure, and accessible wherever you are.

Start Your Riyaz Online

Launch the free, zero-latency Web Harmonium right now. No installations or downloads required.

Play Web Harmonium
komal swara online shuddh swara keyboard difference between komal shuddh harmonium virtual harmonium keyboard hindustani classical music web-harmonium
Share article
WebAssembly
Client-Side Engine
Zero Latency
Processing Speed
0.00 KB
Data Retention
AES-256
Security Standard