# Sanskrit prosody

Sanskrit prosody or Chandas refers to one of the six Vedangas, or limbs of Vedic studies. It is the study of poetic metres and verse in Sanskrit. This field of study was central to the composition of the Vedas, the scriptural canons of Hinduism; in fact, so central that some later Hindu and Buddhist texts refer to the Vedas as Chandas.
The Chandas, as developed by the Vedic schools, were organized around seven major metres, each with its own rhythm, movements and aesthetics. Sanskrit metres include those based on a fixed number of syllables per verse, and those based on fixed number of morae per verse.
Extant ancient manuals on Chandas include Pingala's Chandah Sutra, while an example of a medieval Sanskrit prosody manual is Kedara Bhatta's Vrittaratnakara. The most exhaustive compilations of Sanskrit prosody describe over 600 metres. This is a substantially larger repertoire than in any other metrical tradition.

## Etymology

The term Chandas (Sanskrit: छन्दः/छन्दस् chandaḥ/chandas (singular)) means "pleasing, alluring, lovely, delightful or charming", and is based on the root chad which means "esteemed to please, to seem good, feel pleasant and/or something that nourishes, gratifies or is celebrated". The term also refers to "any metrical part of the Vedas or other composition".

## History

The hymns of Rigveda include the names of metres, which implies that the discipline of Chandas (Sanskrit prosody) emerged in the 2nd-millennium BCE. The Brahmanas layer of Vedic literature, composed between 900 BCE and 700 BCE, contains a complete expression of the Chandas. Panini's treatise on Sanskrit grammar distinguishes Chandas as the verses that compose the Vedas, from Bhāṣā (Sanskrit: भाषा), the language spoken by people for everyday communication.
Vedic Sanskrit texts employ fifteen metres. Seven are common, and the most frequent three are 8-, 11- and 12-syllable lines. Post-Vedic texts, such as the epics as well as other classical literature of Hinduism, deploy both linear and non-linear metres, many of which are based on syllables and others based on repeating numbers of morae (matra per foot). About 150 treatises on Sanskrit prosody from the classical era are known, in which some 850 metres were defined and studied by the ancient and medieval Hindu scholars.
The ancient Chandahsutra of Pingala, also called Pingala Sutras, is the oldest Sanskrit prosody text that has survived into the modern age, and it is dated to between 600 and 200 BCE. Like all Sutras, the Pingala text is distilled information in the form of aphorisms, and these were widely commented on through the bhashya tradition of Hinduism. Of the various commentaries, those widely studied are the three 6th century texts - Jayadevacchandas, Janashrayi-Chhandovichiti and Ratnamanjusha, the 10th century commentary by Karnataka prosody scholar Halayudha, who also authored the grammatical Shastrakavya and Kavirahasya (literally, The Poet's Secret). Other important historical commentaries include those by the 11th-century Yadavaprakasha and 12th-century Bhaskaracharya, as well as Jayakriti's Chandonushasana, and Chandomanjari by Gangadasa.
   There is no word without meter, nor is there any meter without words.
Major encyclopedic and arts-related Hindu texts from the 1st and 2nd millennium CE contain sections on Chandas. For example, the chapters 328 to 335 of the Agni Purana, chapter 15 of the Natya Shastra, chapter 104 of the Brihat Samhita, the Pramodajanaka section of the Manasollasa contain embedded treatises on Chandas.

## Elements
### Classification

The metres found in classical Sanskrit poetry are classified into three kinds.
* Syllabic verse (akṣaravṛtta or aksharavritta): metres depend on the number of syllables in a verse, with relative freedom in the distribution of light and heavy syllables. This style is derived from older Vedic forms, and found in the great epics, the Mahabharata and the Ramayana.
* Syllabo-quantitative verse (varṇavṛtta or varnavritta): metres depend on syllable count, but the light-heavy patterns are fixed.
* Quantitative verse (mātrāvṛtta or matravritta): metres depend on duration, where each verse-line has a fixed number of morae, usually grouped in sets of four.

### Light and heavy syllables

Most of Sanskrit poetry is composed in verses of four lines each. Each quarter-verse is called a pāda (literally, "foot"). Meters of the same length are distinguished by the pattern of laghu ("light") and guru ("heavy") syllables in the pāda. The rules distinguishing laghu and guru syllables are the same as those for non-metric prose, and these are specified in Vedic Shiksha texts that study the principles and structure of sound, such as the Pratishakhyas. Some of the significant rules are:
   Metre is a veritable ship, for those who want to go, across the vast ocean of poetry.
* A syllable is laghu only if its vowel is hrasva ("short") and followed by at most one consonant before another vowel is encountered.
* A syllable with an anusvara ('ṃ') or a visarga ('ḥ') is always guru.
* All other syllables are guru, either because the vowel is dīrgha ("long"), or because the hrasva vowel is followed by a consonant cluster.
* The hrasva vowels are the short monophthongs: 'a', 'i', 'u', 'ṛ' and 'ḷ'
* All other vowels are dirgha: 'ā', 'ī', 'ū', 'ṝ', 'e', 'ai', 'o' and 'au'. (Note that, morphologically, the last four vowels are actually the diphthongs 'ai', 'āi', 'au' and 'āu', as the rules of sandhi in Sanskrit make clear.)
* Gangadasa Pandita states that the last syllable in each pāda may be considered guru, but a guru at the end of a pāda is never counted as laghu.
For measurement by mātrā (morae), laghu syllables count as one unit, and guru syllables as two units.

#### Exceptions

The Indian prosody treatises crafted exceptions to these rules based on their study of sound, which apply in Sanskrit and Prakrit prosody. For example, the last vowel of a verse, regardless of its natural length, may be considered short or long according to the requirement of the metre. Exceptions also apply to special sounds, of the type प्र, ह्र, ब्र and क्र.

### Stanzas

A stanza (śloka) is defined in Sanskrit prosody as a group of four quarters (pādas). Indian prosody studies recognise two types of stanzas. Vritta stanzas are those that have a precise number of syllables, while jati stanzas are those that are based on syllabic time-lengths (morae, matra) and can contain varying numbers of syllables.
The vritta stanzas have three forms: Samavritta, where the four quarters are similar in pattern, Ardhasamavritta, where alternate verses have a similar syllabic structure, and Vishamavritta where all four quarters are different. A regular Vritta is defined as that where the total number of syllables in each line is less than or equal to 26 syllables, while irregulars contain more. When the metre is based on morae (matra), a short syllable is counted as one mora, and a long syllable is counted as two morae.

### Gaṇa

Gaṇa (Sanskrit, "group") is the technical term for the pattern of light and heavy syllables in a sequence of three. It is used in treatises on Sanskrit prosody to describe metres, according to a method first propounded in Pingala's chandahsutra. Pingala organizes the metres using two units:
   * l: a "light" syllable (L), called laghu
   * g: a "heavy" syllable (H), called guru
Pingala's method described any metre as a sequence of gaṇas, or triplets of syllables (trisyllabic feet), plus the excess, if any, as single units. There being eight possible patterns of light and heavy syllables in a sequence of three, Pingala associated a letter, allowing the metre to be described compactly as an acronym. Each of these has its Greek prosody equivalent as listed below.
The Ganas (गण, class) :
| Sanskrit prosody | Weight | Symbol | Style | Greek equivalent |
| Na-gaṇa | L-L-L | u u u | da da da | Tribrach |
| Ma-gaṇa | H-H-H | — — — | DUM DUM DUM | Molossus |
| Ja-gaṇa | L-H-L | u — u | da DUM da | Amphibrach |
| Ra-gaṇa | H-L-H | — u — | DUM da DUM | Cretic |
| Bha-gaṇa | H-L-L | — u u | DUM da da | Dactyl |
| Sa-gaṇa | L-L-H | u u — | da da DUM | Anapaest |
| Ya-gaṇa | L-H-H | u — — | da DUM DUM | Bacchius |
| Ta-gaṇa | H-H-L | — — u | DUM DUM da | Antibacchius |
Pingala's order of the gaṇas, viz. m-y-r-s-t-j-bh-n, corresponds to a standard enumeration in binary, when the three syllables in each gaṇa are read right-to-left with H=0 and L=1.

#### A mnemonic

The word yamātārājabhānasalagāḥ (or yamātārājabhānasalagaṃ) is a mnemonic for Pingala's gaṇas, developed by ancient commentators, using the vowels "a" and "ā" for light and heavy syllables respectively with the letters of his scheme. In the form without a grammatical ending, yamātārājabhānasalagā is self-descriptive, where the structure of each gaṇa is shown by its own syllable and the two following it:
* ya-gaṇa: ya-mā-tā = L-H-H
* ma-gaṇa: mā-tā-rā = H-H-H
* ta-gaṇa: tā-rā-ja = H-H-L
* ra-gaṇa: rā-ja-bhā = H-L-H
* ja-gaṇa: ja-bhā-na = L-H-L
* bha-gaṇa: bhā-na-sa = H-L-L
* na-gaṇa: na-sa-la = L-L-L
* sa-gaṇa: sa-la-gā = L-L-H
The mnemonic also encodes the light "la" and heavy "gā" unit syllables of the full scheme.
The truncated version obtained by dropping the last two syllables, viz. yamātārājabhānasa, can be read cyclically (i.e., wrapping around to the front). It is an example of a De Bruijn sequence.

#### Comparison with Greek and Latin prosody

Sanskrit prosody shares similarities with Greek and Latin prosody. For example, in all three, rhythm is determined from the amount of time needed to pronounce a syllable, and not on stress (quantitative metre). Each eight-syllable line, for instance in the Rigveda, is approximately equivalent to the Greek iambic dimeter. The sacred Gayatri metre of the Hindus consists of three of such iambic dimeter lines, and this embedded metre alone is at the heart of about 25% of the entire Rigveda.
The gaṇas are, however, not the same as the foot in Greek prosody. The metrical unit in Sanskrit prosody is the verse (line, pada), while in Greek prosody it is the foot. Sanskrit prosody allows elasticity similar to Latin Saturnian verse, uncustomary in Greek prosody. The principles of both Sanskrit and Greek prosody probably go back to Proto-Indo-European times, because similar principles are found in ancient Persian, Italian, Celtic, and Slavonic branches of Indo-European.

## The seven birds: major Sanskrit metres

The Vedic Sanskrit prosody included both linear and non-linear systems. The field of Chandas was organized around seven major metres, state Annette Wilke and Oliver Moebus, called the "seven birds" or "seven mouths of Brihaspati", and each had its own rhythm, movements and aesthetics. The system mapped a non-linear structure (aperiodicity) into a four verse polymorphic linear sequence.
The seven major ancient Sanskrit metres are the three 8-syllable Gāyatrī, the four 8-syllable Anustubh, the four 11-syllable Tristubh, the four 12-syllable Jagati, and the mixed pāda metres named Ushnih, Brihati and Pankti.
   गायत्रेण प्रति मिमीते अर्कमर्केण साम त्रैष्टुभेन वाकम् । वाकेन वाकं द्विपदा चतुष्पदाक्षरेण मिमते सप्त वाणीः ॥२४॥
   gāyatréṇa práti mimīte arkám arkéṇa sā́ma traíṣṭubhena vākám vākéna vākáṃ dvipádā cátuṣpadā akṣáreṇa mimate saptá vā́ṇīḥ
   With the Gayatri, he measures a song; with the song – a chant; with the Tristubh – a recited stanza; With the stanza of two feet and four feet – a hymn; with the syllable they measure the seven voices. ॥24॥
The major ancient metres in Sanskrit prosody :
| Meter | Structure | Mapped Sequence | Varieties | Usage |
| Gayatri | 24 syllables; 3 verses of 8 syllables | 6x4 | 11 | Common in Vedic texts Example: Rigveda 7.1.1-30, 8.2.14 |
| Ushnih | 28 syllables; 2 verses of 8; 1 of 12 syllables | 7x4 | 8 | Vedas, not common Example: Rigveda 1.8.23-26 |
| Anushtubh | 32 syllables; 4 verses of 8 syllables | 8x4 | 12 | Most frequent in post-Vedic Sanskrit metrical literature; embedded in the Bhagavad Gita, the Mahabharata, the Ramayana, the Puranas, Smritis and scientific treatises Example: Rigveda 8.69.7-16, 10.136.7 |
| Brihati | 36 syllables; 2 verses of 8; 1 verse of 12; 1 verse of 8 syllables | 9x4 | 12 | Vedas, rare Example: Rigveda 5.1.36, 3.9.1-8 |
| Pankti | 40 syllables; 5 verses of 8 syllables | 10x4 | 14 | Uncommon, found with Tristubh Example: Rigveda 1.191.10-12 |
| Tristubh | 44 syllables; 4 verses of 11 syllables | 11x4 | 22 | Second in frequency in post-Vedic Sanskrit metric literature, dramas, plays, parts of the Mahabharata, major 1st-millennium Kavyas Example: Rigveda 4.50.4, 7.3.1-12 |
| Jagati | 48 syllables; 4 verses of 12 syllables | 12x4 | 30 | Third most common, typically alternates with Tristubh in the same text, also found in separate cantos. Example: Rigveda 1.51.13, 9.110.4-12 |

### Other syllable-based metres

Beyond these seven metres, ancient and medieval era Sanskrit scholars developed numerous other syllable-based metres (Akshara-chandas). Examples include Atijagati (13x4, in 16 varieties), Shakvari (14x4, in 20 varieties), Atishakvari (15x4, in 18 varieties), Ashti (16x4, in 12 varieties), Atyashti (17x4, in 17 varieties), Dhriti (18x4, in 17 varieties), Atidhriti (19x4, in 13 varieties), Kriti (20x4, in 4 varieties) and so on.

### Morae-based metres

In addition to the syllable-based metres, Hindu scholars in their prosody studies, developed Gana-chandas or Gana-vritta, that is metres based on mātrās (morae, instants). The metric foot in these are designed from laghu (short) morae or their equivalents. Sixteen classes of these instants-based metres are enumerated in Sanskrit prosody, each class has sixteen sub-species. Examples include Arya, Udgiti, Upagiti, Giti and Aryagiti. This style of composition is less common than syllable-based metric texts, but found in important texts of Hindu philosophy, drama, lyrical works and Prakrit poetry. The entire Samkhyakarika text of the Samkhya school of Hindu philosophy is composed in Arya metre, as are many chapters in the mathematical treatises of Aryabhata, and some texts of Kalidasa.

### Hybrid metres

Indian scholars also developed a hybrid class of Sanskrit metres, which combined features of the syllable-based metres and morae-based metres. These were called Matra-chandas. Examples of this group of metres include Vaitaliya, Matrasamaka and Gityarya. The Hindu texts Kirātārjunīya and Naishadha Charita, for instance, feature complete cantos that are entirely crafted in the Vaitaliya metre.

## Metres as tools for literary architecture

The Vedic texts, and later Sanskrit literature, were composed in a manner where a change in metres was an embedded code to inform the reciter and audience that it marks the end of a section or chapter. Each section or chapter of these texts uses identical metres, rhythmically presenting their ideas and making it easier to remember, recall and check for accuracy.
Similarly, the authors of Sanskrit hymns used metres as tools of literary architecture, wherein they coded a hymn's end by frequently using a verse of a metre different from that used in the hymn's body. However, they never used Gayatri metre to end a hymn or composition, possibly because it enjoyed a special level of reverence in Hindu texts. In general, all metres were sacred and the Vedic chants and hymns attribute the perfection and beauty of the metres to divine origins, referring to them as mythological characters or equivalent to gods.

### Use of metre to identify corrupt texts

The verse perfection in the Vedic texts, verse Upanishads and Smriti texts has led some Indologists from the 19th century onwards to identify suspected portions of texts where a line or sections are off the expected metre.
Some editors have controversially used this metri causa principle to emend Sanskrit verses, assuming that their creative conjectural rewriting with similar-sounding words will restore the metre. This practice has been criticized, states Patrick Olivelle, because such modern corrections may be changing the meaning, adding to corruption, and imposing the modern pronunciation of words on ancient times when the same syllable or morae may have been pronounced differently.
Large and significant changes in metre, wherein the metre of succeeding sections return to earlier sections, are sometimes thought to be an indication of later interpolations and insertion of text into a Sanskrit manuscript, or that the text is a compilation of works of different authors and time periods. However, some metres are easy to preserve and a consistent metre does not mean an authentic manuscript. This practice has also been questioned when applied to certain texts such as ancient and medieval era Buddhist manuscripts, as this may reflect versatility of the author or changing styles over author's lifetime.

## Texts
### Chandah Sutra

   When halved, (record) two. When unity (is subtracted, record) sunya. When sunya, (multiply by) two. When halved, multiply (by) itself (squared).
The Chandah Sutra is also known as Chandah sastra, or Pingala Sutras after its author Pingala. It is the oldest Hindu treatise on prosody to have survived into the modern era. This text is structured in 8 books, with a cumulative total of 310 sutras. It is a collection of aphorisms predominantly focused on the art of poetic metres, and presents some mathematics in the service of music.

### Bhashyas

There have been numerous Bhashyas (commentaries) of the Chanda sastra over centuries. These are:
Chandoratnakara: The 11th-century bhashya on Pingala's Chandah Sutra by Ratnakarashanti, called Chandoratnakara, added new ideas to Prakrit poetry, and this was influential to prosody in Nepal, and to the Buddhist prosody culture in Tibet where the field was also known as chandas or sdeb sbyor.
Chandahsutrabhasyaraja: The 18th century commentary of the Chandra Sastra by Bhaskararaya.

## Usage
### Post-vedic poetry, epics

The Hindu epics and the post-Vedic classical Sanskrit poetry is typically structured as quatrains of four pādas (lines), with the metrical structure of each pāda completely specified. In some cases, pairs of pādas may be scanned together as the hemistichs of a couplet. This is typical for the shloka used in epic. It is then normal for the pādas comprising a pair to have different structures, to complement each other aesthetically. In other metres, the four pādas of a stanza have the same structure.
The Anushtubh Vedic metre became the most popular in classical and post-classical Sanskrit works. It is octosyllabic, like the Gayatri metre that is sacred to the Hindus. The Anushtubh is present in Vedic texts, but its presence is minor, and Trishtubh and Gayatri metres dominate in the Rigveda for example. A dominating presence of the Anushtubh metre in a text is a marker that the text is likely post-Vedic.
The Mahabharata, for example, features many verse metres in its chapters, but an overwhelming proportion of the stanzas, 95% are shlokas of the anustubh type, and most of the rest are tristubhs.

### Chandas and mathematics

The attempt to identify the most pleasing sounds and perfect compositions led ancient Indian scholars to study permutations and combinatorial methods of enumerating musical metres. The Pingala Sutras includes a discussion of binary system rules to calculate permutations of Vedic metres. Pingala, and more particularly the classical Sanskrit prosody period scholars, developed the art of Matrameru, which is the field of counting sequences such as 0, 1, 1, 2, 3, 5, 8 and so on (Fibonacci numbers), in their prosody studies.
The 10th-century Halāyudha's commentary on Pingala Sutras, developed meruprastāra, which mirrors the Pascal's triangle in the west, and now also called as the Halayudha's triangle in books on mathematics. The 11th-century Ratnakarashanti's Chandoratnakara describes algorithms to enumerate binomial combinations of metres through pratyaya. For a given class (length), the six pratyaya were:
* prastāra, the "table of arrangement": a procedure for enumerating (arranging in a table) all metres of the given length,
* naṣṭa: a procedure for finding a metre given its position in the table (without constructing the whole table),
* uddiṣṭa: a procedure for finding the position in the table of a given metre (without constructing the whole table),
* laghukriyā or lagakriyā: calculation of the number of metres in the table containing a given number of laghu (or guru) syllables,
* saṃkhyā: calculation of the total number of metres in the table,
* adhvan: calculation of the space needed to write down the prastāra table of a given class (length).
Some authors also considered, for a given metre, (A) the number of guru syllables, (B) the number of laghu syllables, (C) the total number of syllables, and (D) the total number of mātras, giving expressions for each of these in terms of any two of the other three. (The basic relations being that C=A+B and D=2A+B.)

## Influence
### In India

   Song and language
   Children understand song, beasts do too, and even snakes. But the sweetness of literature, does the Great God himself truly understand.
The Chandas are considered one of the five categories of literary knowledge in Hindu traditions. The other four, according to Sheldon Pollock, are Gunas or expression forms, Riti, Marga or the ways or styles of writing, Alankara or tropology, and Rasa, Bhava or aesthetic moods and feelings.
The Chandas are revered in Hindu texts for their perfection and resonance, with the Gayatri metre treated as the most refined and sacred, and one that continues to be part of modern Hindu culture as part of Yoga and hymns of meditation at sunrise.

### Outside India

The Sanskrit Chanda has influenced southeast Asian prosody and poetry, such as Thai Chan (Thai: ฉันท์). Its influence, as evidenced in the 14th-century Thai texts such as the Mahachat kham luang, is thought to have come either through Cambodia or Sri Lanka. Evidence of the influence of Sanskrit prosody in 6th-century Chinese literature is found in the works of Shen Yueh and his followers, probably introduced through Buddhist monks who visited India.