2016-07-11

चतुश्श्लोकी

यामुनाचार्येण विरचितां चतुश्श्लोकीनाम्नीं स्तुतिं मातामह्या नैकेभ्यो वत्सरेभ्यः प्रागुपदिष्टोहम् । तस्या अर्थमवेतुं यतमानः अन्वयं लिलेखिषामि ।

स्वादयन्निह सर्वेषां त्रय्यन्तार्थं सुदुर्ग्रहम्।
स्तोत्रयामास योगीन्द्रस्तं वन्दे यामुनाह्वयम् ॥

कान्तस्ते पुरुषोत्तमः फणिपतिः शय्यासनं वाहनं वेदात्मा विहगेश्वरो यवनिका माया जगन्मोहिनी ।
ब्रह्मेशादिसुरव्रजः सदयितस्त्वद्दासदासीगणः श्रीरित्येव च नाम ते भगवति ब्रूमः कथं त्वां वयम् ॥

भगवति । ते कान्तः पुरुषोत्तमः । ते शय्या फणिपतिः । ते आसनं वाहनं वेदात्मा विहगेश्वरः । ते यवनिका माया जगन्मोहिनी । त्वद्दासदासीगणः सदयितः ब्रह्मेशादिसुरव्रजः । ते नाम च श्रीरित्येव । कथं वयं त्वां ब्रूमः ।

अत्र तु श्रियं महाराज्ञीं भावयन् श्रेष्ठतमानि तदुपलक्षणानि वर्णयति कविः । भगवति । हे सर्वमङ्गलवति । "अस्यास्ति" इति मतुप् । कान्तः प्रियतमो दयितः । कर्तरि क्तः । पुरुषोत्तमः उत्तमः पुरुषो नारायणः । "न निर्धारणे" इत्यस्मात्षष्ठीतत्पुरुषनिषेधात्कर्मधारयव्युत्पत्तिः । शय्या तल्पम् । फणिपतिः फणिनां सर्पाणां पतिः आदिशेषः । फणः स्फटा । "अत इनिठनौ" इति मतुबर्थ इन् । आसनमासन्दः आस्यत अस्मिन्निति । वाहनं यानं वाहयतीति । विहगेश्वरो विहगानां खगानामीश्वरो गरुडः । लक्ष्मीस्तु विष्णुवक्षःस्थलस्थिता नित्यानपायिनी गरुत्मति आस्ते तेन वाह्यते चेति यावत् । परस्परं विरोधेपि लक्ष्मीनारायणौ शेषं गरुडमुभावपि भुञ्जात इति विचित्रास्पदम् । यवनिका तिरस्करिणी । पुरा राजस्त्रियो ह्रिया यवनिकान्तर्हिता इति । जगतो मोहः जगन्मोहः । "अत इनिठनौ" इति मतुबर्थ इन् स्त्रीत्वात् ङी च । माया जगन्मोहिनी लोकान्मोहयति यथा ते महालक्ष्मीं द्रष्टुं नालम् । ब्रह्मा चतुर्मुखः ईशो रुद्रः । तौ आदी यस्य स ब्रह्मेशादिः । तथाविधः सुरव्रजो देवसमूहः । सदयितः सप्रियः पत्नीभिः सहितः । महाराज्ञ्या दासदास्यः क्वेति चेत् गणोयमेवेति । सर्वाणि राजलक्षणान्युपवर्ण्य अन्ते नामैव अनुपममित्याह । पाञ्चरात्रागमात् श्रीयते श्रयते श्रुणोति श्रावयति श्रुणाति श्रीणाति चेति श्रीनामधेया । तथा सत्यां त्वयि कथं वा ब्रूमो वयमिति कवेराश्चर्यं भक्तिश्च ।

यस्यास्ते महिमानमात्मन इव त्वद्वल्लभोपि प्रभुर्नालं मातुमियत्तया निरवधिं नित्यानुकूलं स्वतः ।
तां त्वां दास इति प्रपन्न इति च स्तोष्याम्यहं निर्भयो लोकैकेश्वरि लोकनाथदयिते दान्ते दयां ते विदन् ॥

लोकैकेश्वरि । लोकनाथदयिते । दान्ते । यस्याः ते निरवधिं स्वतो नित्यानुकूलं महिमानम् आत्मनः (महिमानम्) इव त्वद्वल्लभः प्रभुरपि इयत्तया मातुं न अलम् । तां त्वां दासः इति प्रपन्नश्चेति निर्भयोहं ते दयां विदन् स्तोष्यामि ।

कविरत्र देव्या अनन्तं महिमानं वर्णयन्नाह । लोकैकेश्वरि । लोकानां सर्वजनानाम् एका केवला ईशवरी ईशित्री सम्बुद्धौ । एकोल्पार्थे प्रधाने च प्रथमे केवले तथा । साधारणे समानेपि सङ्ख्यायां च प्रयुज्यते ॥ लोकनाथदयिते । जगत्पतिप्रिये । दान्ते । दमवति । दमुँ उपशमे इत्यस्मात् क्तः कर्तरि । "अनुनासिकस्य क्विज्झलोः क्ङिति" इति उपधादैर्घ्यम् । निरवधिम् अवधिरहितम् अपरिमितम् । स्वतः लोकनाथात् त्वद्वल्लभात् नाम श्रीमन्नारायणतः नित्यानुकूलं सदानुसारम् । महिमानं महत्त्वम् । आत्मनः स्वस्य तन्नाम श्रीपतेः । त्वद्वल्लभस्तव प्रियतमः । प्रभुः स्वामी पुनश्च भगवान् । इयत्तया एतावदिति । मातुं तोलयितुम् । न अलम् अपर्याप्तः । यस्याः तादृक् महिमा यं मातुं भगवानपि अपर्याप्तः तादृशां तां त्वां स्तोष्यामि नुतिं करिष्ये । कथंभूतः स्तोष्यामीति चेत् । दासः किङ्करः । प्रपन्नः शरणं गतः । निर्भयः अपगतत्रासः । किमर्थं निर्भय इति चेत् । भवत्याः दयां करुणां विदन् जानानः । महालक्ष्म्याः अपारां करुणां सम्यक् अवबुध्यन् तद्दयया भवसागरं तरीष्यामीति विश्वसन् विगतभयः स्तोष्यामीति अभिप्रायः ।

ईषत्त्वत्करुणानिरीक्षणसुधासन्धुक्षणाद्रक्ष्यते नष्टं प्राक्तदलाभतस्त्रिभुवनं सम्प्रत्यनन्तोदयम् ।
श्रेयो न ह्यरविन्दलोचनमनःकान्ताप्रसादादृते संसृत्यक्षरवैष्णवाध्वसु नृणां सम्भाव्यते कर्हिचित् ॥

त्रिभुवनम् अनन्तोदयं रक्ष्यते ईषत् त्वत्करुणानिरीक्षणसुधासन्धुक्षणात् प्राक् नष्टं तदलाभतः । नृणां संस्रुत्यक्षरवैष्णवाध्वसु श्रेयः न हि सम्भाव्यते अरविन्दलोचनमनःकान्ताप्रसादात् ऋते ।

अथ श्रियः अनन्ता करुणा तद्धेतूनि फलानि च वर्ण्यन्ते । त्रिभुवनं लोकत्रयं भूर्भुवःस्वर्गात्मकम् । एकवद्भावी द्विगुः त्रयाणां भुवनानां लोकानां समाहार इति । अनन्तोदयं अनन्ताः उदयाः यस्य तादृक् त्रिभुवनं निरवधिकालमिति । प्राक् नष्टं चतुर्युगान्ते प्रलीनं परब्रह्मणि । क्वेति चेत् । तदलभातः । त्वद्दयाकटाक्षम् अनवाप्य । "अतिग्रहाव्यथनक्षेपेष्वकर्तरि तृतीयायाः" इति तसिँ |
सर्वनाम्नः त्वत्करुणानिरीक्षणसुधासन्धुक्षणेन्वयः । प्राङ्नष्टमधुना रक्ष्यते भुज्यते । कुत इति  | त्वत्करुणानिरीक्षणसुधासन्धुक्षणात् । पञ्चमी हेतौ । तव करुणायाः दयायाः निरीक्षणमेव दृष्टिरेव सुधा अमृतम् । तस्याः सन्धुक्षणं स्फूर्तिः । तस्मात् तस्य हेतुना । जगन्ति वरीवृतति तस्याः करुणया चेत् पुरुषार्था अपि किं तस्याः दयया लभ्येरन् । आमित्याह यथा । अरविन्दलोचमनःकान्ताप्रसादात् । अरविन्दे तामरसे इव लोचने यस्य सः नारायणः ।  तस्य कान्ता सहधर्मिणी श्रीः । तस्या मनः चेतः । तत्प्रसादः तोषात् अनुग्रहः । तस्मादृते तं विना नेति । ऋते किं न ।  नृणां मनुष्याणां संसृतौ संसारसम्बद्धेषु ऐश्वर्यादिषु फलेषु अक्षरे कैवल्यमोक्षे वैष्णवाध्वनि परमपदप्राप्तौ श्रेयः भद्रं न हि सम्भाव्यते उपपद्यते कर्हिचित् कदाचन । किमुत इतरे पुरुषार्थाः मोक्षोपि देव्याः करुणाकटाक्षावलम्बित इत्यभिप्रैति ।

शान्तानन्दमहाविभूति परमं यद्ब्रह्म रूपं हरेर्मूर्तं ब्रह्म ततोपि तत्प्रियतरं रूपं यदत्यद्भुतम् ।
यान्यन्यानि यथासुखं विहरतो रूपाणि सर्वाणि तान्याहुः स्वैरनुरूपरूपविभवैर्गाढोपगूढानि ते ॥

यत् शान्तानन्दमहाविभूति परमं ब्रह्म रूपं । ततोपि तत् प्रियतरं (रूपं) यत् मूर्तं ब्रह्म अत्यद्भुतम् । यथासुखं विहरतः हरेः  यानि अन्यानि रूपाणि । तानि सर्वाणि ते स्वैरनुरूपरूपविभवैः गाढोपगूढानि आहुः (प्रमाणाः) ।

अथ दिव्यदम्पत्योरनपायित्वम् उपवर्णयति । नारायणस्य यानि रूपाणि मूर्तयः सन्ति । कीदृंशि । प्रथमं दिव्यात्मस्वरूपम् । शान्तानन्दमहाविभूति | शान्तं षड्भिरूर्मिभिः पिपासाक्षुच्छोकमोहजरामृत्युभी रहितम् । आनन्दम् ज्ञानानन्दमयम् । महाविभूति सर्वव्यापि । तथा शान्तम् आनन्दं महाविभूति शान्तानन्दमहाविभूतीति । परमं परो मास्येति परमं निरुपमम् । ब्रह्म बृहत् बृंहणं च । अधुना दिव्यमङ्गलविग्रहः । मूर्तं मूर्तिमत् ब्रह्म ब्रह्मशब्दवाच्यम् अत्यद्भुतमत्याशर्यकरं ततोपि अमूर्तरूपादपि प्रियतरं लोकानां सौलभ्यात् यद्रूपं तत् । हरिर्विष्णुः यथासुखं यथेच्छं विहरति परिक्रामति । तथाभूतस्य यानि अन्यानि रूपाणि स्युः । विभवादिमूर्तीनां ग्रहणमत्र । आहुः प्रमाणा इति शेषः । किमाहुः । तानि सर्वाणि रूपाणि ते तव स्वैः स्वकीयैः अनुरूपरूपविभवैः अनुरूपाणाम् अनुकूलानां रूपाणां मूर्तीनां विभवैः कीर्तिमद्भिः गाढोपगूढानि गाढम् दृढम् उपगूढानि आलिङ्गितानि अनपायीनि ।

आकारत्रयसम्पन्नामरविन्दनिवासिनीम् ।
अशेषजगदीशित्रीं वन्दे वरदवल्लभाम् ॥

सर्वं श्रीकृष्णर्पणमस्तु ॥

2014-03-27

A custom keymap for Indian languages

As we saw in the last couple of posts, keying in Indian languages using a QWERTY keyboard requires a keyboard/IME software as well as a standardised way to map the Latin alphabet to the characters in the Indian language du jour. As before, I use Google's Input Tools on Windows and Lipika on OS X. Unlike a representation format (which case use diacritic or other accent marks), a key-map can only employ the characters inputtable through the QWERTY keyboard. So while I use ISO-15919 as the representation format, I needed a key-map as well. As in the previous post, here were my requirements:
  1. Meaningfulness
  2. Pan‐linguistic consistency
  3. Fidelity to pronunciation
  4. Modularity and symmetry
  5. Alphabet restrictions: the scheme must use only Latin characters to represent phonemes; the scheme may use punctuation marks to represent non-phonemic punctuation-like characters in the target language.
With these requirements, I set about to create a key-map I could use. I'd start with my requirements, and in the end, if the key-map ended up resembling an existing "standard", I'd just stick with that instead.

I started out by identifying characters in Tamil and Sanskrit (the 2 Indian languages I write in) based on phonetics and history; this identification process is important for pan-linguistic consistency.

Vowels and Dependents
Sanskrit (Devanagari) ISO‐15919 Tamil Key-map
a
i
u
r̥̄
l̥̄
e
ai
o
au
'

Consonants
Sanskrit (Devanagari) ISO‐159191 Tamil Key-map
क् k க்
ख् kh
ग् g
घ् gh
ङ् ங்
च् c ச்
छ् ch
ज् j
झ् jh
ञ् ஞ்
ट् ட்
ठ् ṭh
ड्
ढ् ḍh
ण् ண்
t ̱ ற்
ன்
त् t த்
थ् th
द् d
ध् dh
न् n ந்
प् p ப்
फ् ph
ब् b
भ् bh
म् m ம்
य् y ய்
र् r ர்
r ̣ ழ்
ळ् ள்
ல்
ल् l
व् v வ்
श्
ष्
स् s
ह् h

The next step was filling in the key-combinations that were "natural" and "obvious".
  1. Given the existence of short and long vowels, using lower- and upper-case letters for vowels seems natural.
  2. Naturally, any unmarked consonant in ISO-15919 can be mapped to the bare letter.
  3. Representing retroflexion by upper-casing the corresponding dental consonant is standard-practice. By modularity, we can do the same for liquids and sibilants too.

Sanskrit (Devanagari) ISO‐15919 Tamil Key-map
a a
A
i i
I
u u
U
r̥̄
l̥̄
e e
E
ai ai
o o
O
au au
'
क् k க் k
ख् kh kh
ग् g g
घ् gh gh
ङ् ங்
च् c ச் c
छ् ch ch
ज् j j
झ् jh jh
ञ् ஞ்
ट् ட் T
ठ् ṭh Th
ड् D
ढ् ḍh Dh
ण् ண் N
t ̱ ற்
ன்
त् t த் t
थ् th th
द् d d
ध् dh dh
न् n ந் n
प् p ப் p
फ् ph ph
ब् b b
भ् bh bh
म् m ம் m
य् y ய் y
र् r ர் r
r ̣ ழ்
ळ् ள் L
ல்
ल् l l
व् v வ் v
श्
ष् S
स् s s
ह् h h

6 issues remain: Dravidian alveolar consonants, the Dravidian approximant, Sanskrit nasals, Sanskrit sibilants, Sanskrit syllabic vowels, and miscellaneous rarely used dependents.
  1. Dravidian alveolar consonants: from the point of view of tongue-position, alveolar stops are intermediate between dental stops and retroflex stops. From this, a natural choice of key-combination for an alveolar stop is a juxtaposition of the keys for the corresponding dental and retroflex stops. Likewise for the alveolar liquid ல்.
  2. Dravidian approximant: based on usage, I picked 'z' as the key for the approximant ழ். The fact that non-native speakers mispronounce the approximant as a voiced sibilant adds credibility to this choice :-)
  3. Sanskrit nasals and sibilants: there are 2 remaining nasals: ङ्, ञ् and one remaining sibilant: श्. The palatal nasal is both a palatal stop and a nasal; a natural representation combines the nasality of 'n' with the palatalness of 'j' or 'c'; we thus get 'nj' and 'nc' as possible key-combinations. By correspondence, the palatal sibilant श् is 'sc' or 'sj', and the velar nasal ङ् 'nk or 'ng'.
Looks like the consonants are done! Here they are:
Consonants
Sanskrit (Devanagari) ISO‐15919 Tamil Key-map
क् k க் k
ख् kh kh
ग् g g
घ् gh gh
ङ् ங் nk/ng
च् c ச் c
छ् ch ch
ज् j j
झ् jh jh
ञ् ஞ் nc/nj
ट् ட் T
ठ् ṭh Th
ड् D
ढ् ḍh Dh
ण् ண் N
t ̱ ற் tT/Tt
ன் nN/Nn
त् t த் t
थ् th th
द् d d
ध् dh dh
न् n ந் n
प् p ப் p
फ् ph ph
ब् b b
भ् bh bh
म् m ம் m
य् y ய் y
र् r ர் r
r ̣ ழ் z
ळ् ள் L
ல் lL/Ll
ल् l l
व् v வ் v
श् sc/sj
ष् S
स् s s
ह् h h
  1. Sanskrit syllabic vowels: The Sanskrit syllabic vowels (ऋ, ॠ, ऌ, ॡ – the last one not actually used) present a problem. The mid-central vowel inherent in these is absent in European languages and thus lacks a symbol; it can however be described as mid-way between 'y' and 'w'. 'y' is already used up in our scheme, but 'w' is free! Using 'w' also ensures people don't mispronounce it as a front-vowel. We thus get 'rw', 'Rw', 'lw' and 'Lw' respectively.
  2. Misc. dependent letters: There are a few different dependent letters that can only existƒ attached to a vowel — the anusvāra, the anunāsika, the visarga and its two other forms the jihvāmulīya and the upadhmānīya, and the āythayeṛuttu. The anusvāra is traditionally represented by an 'M', and the anunāsika by 'MM'; we can stick with those. The visarga, likewise is an 'H'. The upadhmānīya is closest to the Latin 'f', and we can use that. The jihvāmūlīya and the āythayeṛuttu are both velar/glottal and as such 'K' is the most suitable.
We finally have a complete key-map for vowels and dependents! Here it is:
Vowels and Dependents
Sanskrit (Devanagari) ISO‐15919 Tamil Key-map
a a
A
i i
I
u u
U
rw
r̥̄ Rw
lw
l̥̄ Lw
e e
E
ai ai
o o
O
au au
M
MM
H
f
K
K
' '

You can download the keymap for Tamil and Sanskrit from http://code.ambari.sh/keymap.

Footnotes:

1 Unfortunately, ISO-15919 does not distinguish between alveolar and dental liquids; Tamil has only the former, while Sanskrit only the latter. As such, I've had to make a few minor modifications to ISO-15919, where ற and ல are concerned. Thanks to Greg for pointing this out in the comments.

2014-03-02

Representing Indian languages using the Latin script

Indian languages are written in a diverse set of scripts, most of them derived from the Brahmi script and not from the Phoenician script. These scripts neither look like Latin, nor do they have the familiar A, B, … ordering. Further, many Indian languages have many phonemes not present in languages Latin was traditionally used for. As a consequence, many of these scripts have many more than 26 base glyphs (not to mention ligature forms). Mapping these to Latin characters becomes important for 2 distinct uses:
  1. storing/presenting Indian language content
  2. inputting Indian language content.
While Unicode encodes most popular scripts used for Indian languages and even some rare ones, Latin‐letters continue to be used in representing Indian languages everywhere. They're used in email, in SMS messages, in web‐pages, in file‐names; pretty much ubiquitously. But how to map the diverse phoneme set (between 30–50 for most Indian languages) into the 26 letters in the Latin alphabet?

[Likewise, physical keyboards with a QWERTY layout dominate the world; how to allow combinations of characters on the QWERTY keyboard to represent the diverse character sets in Indian languages? I'll address this in another post.]

As usual, there are many options.

"The nice thing about standards is that you have so many to choose from." Andrew S. Tanenbaum

ISO‐15919, an international scholastic standard, and a few other schemes – IAST, Hunterian, National Library of Kolkata, ALA‐LC – use diacritic (accent) marks over/under Latin characters. Harvard‐Kyoto, Velthuis, ITRANS, SLP1, WX, VedaType and ISO‐15919's limited character set option are schemes that restrict themselves to 7‐bit ASCII but use punctuation characters.

For example, here're the same Sanskrit characters in a few sample schemes:
Devanagari ISO‐15919 Hunterian ISO‐15919‐lcs Harvard‐Kyoto ITRANS
aa A aa/A
ri ,r R RRi/R^i
e ee e e
ं (anusvāra) m ;m M M
ख् kh kh kh kh kh
ञ् n ~n J ~n/JN
ड् d .d D D
श् sh ;s z sh

What a mess!

I'm going to address what I think should be the hallmarks of a good scheme for representing Indian language text using Latin characters – how one can figure out if such a scheme was thoughtfully, carefully designed and not thrown together in the middle of a Usenet discussion.

[Note: Indian languages being phonetic, I'm sometimes careless about the phoneme vs. written character distinction. I carelessly use the word “character” for both; the meaning should be clear].

Here's my prioritised list of features a good Indian language representation scheme should have:

  1. Unambiguity: the scheme must preserve the integrity of the script. Put another way, the mapping should be reversible from Latin back to the original script without loss. [Shockingly, the Hunterian scheme fails this basic test.]
  2. Meaningfulness: the scheme must use Latin letters phonetically close to the original Indian language sound. This automatically rules out absurdities like using f for the Sanskrit velar nasal (ङ्) [vide. the wx notation].
  3. Pan‐linguistic consistency: identical phonemes across Indian languages must have identical representations. Especially as Indian languages have heavily borrowed from Sanskrit, it's inconsistent if the "same" word has multiple Latin representations. Sadly, many schemes fail to satisfy this requirement: in ITRANS, the Sanskrit word केवल is represented as “kevala”, but its Tamil borrowing is represented as “kēvala”.
  4. Pan‐linguistic consistency: conversely, a single Latin representation must identify the same phoneme across Indian languages. Again, some schemes fail this requirement too — in some schemes, ḷ would mean a syllabic dental liquid in Sanskrit but could mean a retroflex liquid consonant in Tamil.
  5. Fidelity to pronunciation: the scheme should aid pronunciation, or at least, not encourage distortion. Harvard‐Kyoto's RRi for a syllabic alveolar trill; ITRANS's x for a conjunct consonant and GY/dny for another conjunct consonant are all misspellings (for phonetic languages, misspelling and mispronunciations go together!)
  6. Modularity and symmetry: in Indian languages, the phonemes (and thus the characters) have relationships among them: clearly, the palatal nasal stop has a relationship with the other nasals, as well as a different relationship to the other palatal stops, and yet another relationship with palatal/semi‐palatal vowels. Any scheme may have various mechanisms to represent such features: perhaps an underdot may represent retroflexion, or perhaps doubling a Latin letter may indicate vowel‐length. These mechanisms should be modular and symmetric, i.e. they should work independent of one another, and they should always mean the same thing. If doubling the vowel ‘a’ indicates a long ‘a’ sound, doubling the vowel ‘i’ should indicate a long ‘i’ sound. If adding an underdot to ‘t’ makes it retroflex, adding an underdot to ‘s’ should make that retroflex too.
  7. Alphabet restrictions: the scheme must not use punctuation-marks or mixed-casing. Punctuation‐marks in the middle of words look ugly. ;L'ik:e t"h..i;s. As does miXEd‐CaSiNg. Using punctuation marks also collides with well‐understood orthographic usages: it seems like a shame to not be able to use commas in transliterated Tamil text, just because the scheme gives the comma a special meaning. And starting every sentence with a lower‐case letter is too edgy for my taste.
Only one of the standard schemes fulfils 6 of the 7 requirements completely and the 7th partially (it uses punctuation, but only to represent some combinations that cannot normally occur in the language) – ISO‐15919. In addition to being well thought‐out and sane, it is an international standard and is widely used in scholastic publications. Its one drawback is that the official standard is not available free of cost; instead, ISO charges more then $100 for an electronic copy. However, it's fully documented at Dr. Anthony Stone's website and is usable today. I use it everyday, and so should you!

2014-01-04

On keying in Indian languages

Right from the time I started out learning Sanskrit, I've had to type in Devanagari to send email, do my assignments, write blog-posts etc. Sometime later, I realised I'd like to be able to write in my mother-tongue, Tamil, too: I was rapidly becoming more fluent at writing in Sanskrit than in Tamil, and that bothered me! I used to use Windows and now use OS X, and have used a variety of tools to be able to compose in Indic scripts. I thought I'd write about my journey, what tools I loved, used, hated and discarded and what I now use.

In 2008, to begin with, my requirements were — types Devanagari, works on Windows Vista+, works across all applications (no browser plug-in for me) and has configurable key-maps. That last was very important. There were multiple competing ways to render Sanskrit in ASCII (and corresponding ways to type Devanagari on an US-ASCII keyboard): Harvard-Kyoto, IAST, ITRANS, etc. They had nothing in common, except for one thing: they all sucked. [I'll explain why in a follow-up post.] So I needed to use a keymap I liked, one I created myself.

I started out using Ajit Krishnan's wonderful Mudgala IME. It was very straight-forward to use, and supported custom keyboards. Switching to and out of it was so easy, and it never crashed once in more than a year of using it. But 2 things made me want moar: first, Mudgala IME didn't support Tamil very well. Secondly, Mudgala IME worked by installing a low-level keyboard-hook. Windows has a way to support software keyboards and Input Method editors so that the keyboard/IME would show up in the Language Bar, and other Good Things™ would happen. Mudgala IME instead worked at a much lower level by intercepting every key-stroke, translating to the corresponding Devanagari code-point, and inserting it into the current window. This approach had a couple of drawbacks: as above, it didn't integrate well with Windows or with the keyboard shortcuts Windows provides to switch input keyboards. Worse, the keyboard shortcut Mudgala provided to switch to and out of it was a global shortcut and interfered with others software's use of that shortcut. If you didn't understand the above, suffice it to say that its integration with Windows is non-standard :-)

In 2009, Google came out with its Indic language input tools; this has now became Google Input Tools for Windows. You had to install a separate piece of software for each language you need to type in. It did support custom keyboards, but you had to switch to your custom keyboard explicitly, and worse, you had to do that every-time you switch languages. Worst of all, if you had multiple custom keyboards per language (say, a keyboard to output Devanagari and one to output ISO-15919), you had to use the GUI to switch keyboards each time. Kind of bad UX, but it worked OK otherwise. There were also occasional bugs involving typing too soon after switching to the Google IME: the thing needed a few seconds to initialise, and it would swallow key-strokes till then!

In 2013, Google released an update in 2013 that unified the various language-specific IMEs: you now had to install one software, and pick various languages at installation-time. Unhappily, the documentation on setting up custom keyboards was never updated: the page refers to a Scheme directory of C:/Program Files/Google/Google [Language] Input/, but the actual directory is:

%ProgramData%/Google/Google Input Tools/com.google.input_tools.t13n.ime.{language-name}/schemes/

The other bugs remain, but this is, in my experience, the most solid and clean Indic typing solution on Windows today. I use to type Sanskrit (in Devanagari, Grantha, IPA, ISO-15919) and Tamil (in Vattu, IPA, ISO-15919) and it's never let me down.

Lately, though, I've switched from my trusty Thinkpad to my wife's old MacBook Air, and as soon as I switched, I realised there was a paucity of good IMEs on OS X. Happily, my friend Ranganath Atreya has come up with Lipika, an IME that also supports the same custom-keyboard format Google IME does (yay for compatibility!). I was one of the beta-testers, and I love it.

At work, I use Windows and don't want to install software; when I occasionally want to send email, I use Google Input Tools online. It's pretty Google-y: barebones but efficient.

On my Windows Phone, Microsoft still does not allow 3rd party keyboards :-( I make do with Binu's Type Tamil and Type Sanskrit, which let you input text, which you then have to copy and paste into wherever you want. This sucks, so I'm still looking to you, Microsoft!

2013-11-16

अहोबिलमठाधीशस्य ध्यानश्लोकः

मातरं पितरं ज्येष्ठान्सर्वान्कृत्वा हृदि स्थितान् ।
इन्दिरासहितं विष्णुं नत्वा ग्रन्थमुपक्रमे ॥
लक्ष्मीनाथसमारम्भां नाथयामुनमध्यमाम् ।
अस्मदाचार्यपर्यन्तां वन्दे गुरुपरम्पराम् ॥
विशिष्टाद्वैतसिद्धान्तस्य श्रीवैष्णवसम्प्रदायस्य प्रतिष्ठापयितुः श्रीमदहोबिलमठस्य पीठाधीपतयो वैकुण्ठवासिनः श्रीमन्नारायणयतीन्द्रमहादेशिकाः आसन् । तेषामुपरि ध्यानश्लोकमिमं भक्ताः पापठ्यन्ते ।
श्रीमद्रङ्गशठारिसंयमिवराल्लब्धागमान्तद्वयं
    श्रीमद्वीररघूद्वहाद्यशठजित्पादारविन्दाश्रयम् ।
श्रीमद्वेदवतंसदेशिकयतेः कारुण्यवीक्षास्पदं
    सेवे रङ्गधुरीणशासनवशं नारायणं योगिनम् ॥
सद्यो भागुरिमतप्रसिद्धमल्लोपम् अवालोके । तथा लुप्ताकारेषु पदेषु अन्यतमं “वतंसः” स्तोत्रस्थं स्मृतिमागतम् । तच्चिन्तनात् स्तुतिरपि स्मृतिपथमायात् । स्तुतिरियं व्याख्येयेति धिया प्रयत्नेस्मिन्नुद्युक्तोस्मि ।

अन्वयः

श्रीमद्रङ्गशठारिसंयमिवरात् लब्धागमान्तद्वयं श्रीमद्वीररघूद्वहाद्यशठजित्पादारविन्दाश्रयं श्रीमद्वेदवतंसदेशिकयतेः कारुण्यवीक्षास्पदं रङ्गधुरीणशासनवशं नारायणं योगिनं सेवे । शार्दूलविक्रीडितम् ।

व्याख्या

अथ श्रीमद्रङ्गशठारिसंयमिवरात् । श्रीमान् मङ्गलवान् अस्यास्तीति मतुप् । रङ्गं श्रीरङ्गनगरम् । शठारिः शठस्यारिः संसारबन्धकशठवायोः जन्मना शत्रुत्वात् भवविमुक्तत्वात् शठकोपमुनिद्योतकं नामधेयम् । रङ्गं तदेव शठारी रङ्गशठारिः । संयमी । वियामो वियमो यामो यमो संयामसंयमौ इत्यमरः । अस्यास्तीति इन् । संयमी यतिः सन्न्यासी । रङ्गशठारिः स एव संयमी रङ्गशठारिसंयमी । द्विचत्वारिंशस्य पट्टधारिणोहोबिलमठाधीशस्य श्रीरङ्गशठकोपयतीन्द्रमहादेशिकस्य द्योतकम् । श्रीमानसावेव रङ्गशठारिसंयमी श्रीमद्रङ्गशठारिसंयमी । तद्वरः षष्ठीतत्पुरुषः । नलोपः प्रातिपदिकान्तस्येति श्रीमद्रङ्गशठारिसंयमिवरः । तस्मात् । विभाषा गुणोस्त्रियाम् इति पञ्चमी । लब्धागमान्तद्वयम् । आगमान्तो वेदान्त उपनिषदः । तद्द्वयं देवभाषोपनिषदो द्रमिडोपनिषदश्च । द्रमिडोपनिषदस्तु दिव्यसूरिभी रचिताः चतुःसहस्राणि दिव्यप्रबन्धाः वेदवन्मुख्यत्वात् उपनिषद्वन्मन्यमानत्वात् तथाभिहिताः । लब्धमागमान्तद्वयं येन सः लब्धागमान्तद्वयः तम् । श्रीरङ्गशठकोपयतीन्द्रमहादेशिकात् कालक्षेपेण नारायणयतीन्द्रमहादेशिकः उभयवेदान्तसारम् अध्यैत, तेन समाश्रयणं च व्यदधात् इति स्मारकः पादः ।
श्रीमद्वीररघूद्वहाद्यशठजित्पादारविन्दाश्रयम् । रघूद्वहाः रघुकुलोद्भवाः तेष्वाद्यः रघूद्वहाद्यो राघवः । शठं जयतीति शठजित् ह्रस्वस्य पिति कृति तुगिति तकारागमः । श्रीमान् वीरः रघूद्वहाद्यः स एव शठजित् श्रीमद्वीररघूद्वहाद्यशठजित् त्रिचत्वारिंशं अहोबिलमठाधिपतिं वीरराघवयतीन्द्रमहादेशिकं द्योतयति । पादावेव अरविन्दे पादारविन्दे । श्रीमद्वीररघूद्वहाद्यशठजितः पादारविन्दे श्रीमद्वीररघूद्वहाद्यशठजित्पादारविन्दे । ते आश्रयो यस्य स श्रीमद्वीररघूद्वहाद्यशठजित्पादारविन्दाश्रयः । तम् । वीरराघवयतीन्द्रमहादेशिकेन नारायणयतीन्द्रमहादेशिकः यथाविधि भरं समर्प्य प्रपन्नत्वं प्रापेति ज्ञापकं पदम् ।
श्रीमद्वेदवतंसदेशिकयतेः । वतंसोवतंसः शेखरः । पुंस्युत्तंसावतंसौ द्वौ कर्णपूरेपि शेखरे इत्यमरः । अकारो लुम्पति भागुरिमतात् । वष्टिभागुरिरल्लोपमवाप्योरुपसर्गयोः । वेदानां वतंसः वेदशिखरो वेदान्तः । श्रीमान् वेदवतंसः देशिकः स एव यतिः श्रीमद्वेदवतंसदेशिकयतिः चतुश्चत्वारिंशस्य मठाधिनायकस्य वेदान्तदेशिकयतीन्द्रमहादेशिकस्याभिधा । कारुण्यवीक्षास्पदम् । करुणैव कारुण्यं स्वार्थे ष्यञ् । वीक्षा दृष्टिः । कारुण्यस्य वीक्षा कारुण्यवीक्षा । कारुण्यवीक्षायाः आस्पदम् कारुण्यवीक्षास्पदम् । वेदान्तदेशिकयतीन्द्रमहादेशिकस्य दययैव नारायणयतीन्द्रमहादेशिकः सन्न्यासाश्रमं प्रतिपन्न इति द्योतितम् । किञ्च तत्करुणया किल नारायणयतीन्द्रमहादेशिकेन मठाधिपतिता सम्प्राप्ता इति सूचकः पादः ।
सेवे उपासे । रङ्गधुरीणशासनवशम् । धुरीणो नायको नाथः । धूर्वहे धुर्यधौरेयधुरीणाः सधुरन्धराः इत्यमरः । रङ्गस्य धुरीणो रङ्गधुरीणः रङ्गनाथः श्रीरङ्गस्थोर्चावतारः । तच्छासनं निर्देशः । अववादस्तु निर्देशो निदेशः शासनं च सः इत्यमरः । रङ्गधुरीणशासनं वशो यस्य सः रङ्गधुरीणशासनवशः । तम् । पञ्चचत्वारिंशः मठाधिपतिः ज्ञापितः पादेस्मिन् । नारायणं नारायणयतीन्द्रमहादेशिकाभिधम् । योगिनं यतिम् ।
इत्थं चतुर्णामपि पूर्वभूतानां मठाधीशानां ग्रहणेन सकलायाः आचार्यपरम्परायाः ज्ञापनमिति विशेषः ।

लेखसूची

समर्पणम्

अहोबिलमठाधीशमुभयोपनिषद्गुरुम् ।
नारायणं मदाचार्यं प्रणतोस्मि मुहुर्मुहुः ॥
दोषाः सर्वे क्षमित्वा मे वाचकैर्निखिलैर्मृडैः ।
सारांशाश्च परिग्राह्या इत्थं मदीययाचनम् ॥

॥ ॐ सर्वं श्रीकृष्णार्पणमस्तु ॥

2012-12-31

The mēḷakartā scheme considered harmful

What is the mēḷakartā scheme?

Classical music is defined by its usage of rāgas. Each rāga can invoke specific emotions in rasikas, and each rasika will have their set of favourite (and disliked) rāgas. While music comprises kalpitasaṅgīta and manōdharmasaṅgīta, both aspects adhere to the underlying rāgalakṣaṇa. With few exceptions, each piece is composed in one prescribed rāga, and that rāga constrains both kalpitasaṅgīta and manōdharmasaṅgīta in that piece. Transgressing the boundaries of a rāga by mistake is an egregious error, and such an apasvara would be spotted immediately by many rasikas.

Much music theory is devoted to classifying these rāgas. The predominant scheme used to today is the mēḷakartā scheme, involving 72 mēḷakartā, or janaka rāgas, and all other janya rāgas classified under them. Ramamatya (c.1550 CE), in his svaramēḷakalānidhi, proposed a mēḷam-based scheme, which Venkatamakhin (17th c. CE) extended into a mēḷakartā scheme in his chaturdaṇḍiprakāśikā. The scheme followed today is a standardised variant proposed by Govindacharya (17th-18th c. CE), in his saṅgrahacūḍāmaṇi.

How does it work?

12 svarasthānas are enumerated, from the base ṣadja to the ṣadja of the next octave (left-inclusive), and are given the following names, picked from an earlier nomenclature.
  1. Sa
  2. Ri1
  3. Ri2/Ga1
  4. Ri3/Ga2
  5. Ga3
  6. Ma1
  7. Ma2
  8. Pa
  9. Da1
  10. Da2/Ni1
  11. Da3/Ni2
  12. Ni3
The mēḷakartās, then, are all the possible rāgas that include the Sa & Pa, and have one each Ri, Ga, Ma, Da & Ni, with the obvious restriction that the Ga chosen should be higher than the Ri, and likewise the Da and the Ni. There are 6 possible Ri-Ga combinations (Ri1Ga1, Ri1Ga2, Ri1Ga3, Ri2Ga2, Ri2Ga3 & Ri3Ga3), likewise 6 combinations of Da-Ni, and 2 options for Ma. There are thus 72 mēḷakartās, also termed sampūrna as each has all 7 notes.

Every other rāga, which may not adhere to the above lakṣaṇa, is then notated as a pair of scales of the above notes – an ārōhaṇa and an avarōhaṇa – that define them. The ārōhaṇa is a scale that starts at a lower Sa and ends at the next Sa and is meant to be a union of all possible ascending sequences of notes valid in the rāga. Likewise, the avarōhaṇa, starting at a higher Sa and ending at the previous Sa is meant to combine all possible valid descending note sequences. The janya rāga is then classified "under" the mēḷakartā rāga.

e.g. Arabhi is considered to be the scale SaRi2Ma1PaDa2Sa/SaNi3Da2PaMa1Ga3Ri2Sa, and is thus classified under mēḷakartā SaRi2Ga3Ma1PaDa2Ni3Sa/SaNi3Da2PaMa1Ga3Ri2Sa, which happens to be Sankarabharanam. Purvikalyani, which is assigned the scale SaRi1Ga3Ma2PaDa2PaSa/SaNi3Da2PaMa2Ga3Ri1Sa, is considered a derivative of mēḷakartā SaRi1Ga3Ma2PaDa2Ni3Sa/SaNi3Da2PaMa2Ga3Ri1Sa or Gamanasramam. Bhairavi, nominally the scale SaGa2Ri2Ga2Ma1PaDa2Ni3Sa/SaNi3Da1PaMa1Ga2Ri2Sa (note the 2 different Gas), is classified under SaRi2Ga2Ma1PaDa1Ni3Sa/SaNi3Da1PaMa1Ga2Ri2Sa, Natabhairavi, with the Da2 considered an anyasvara.

How is it used?

In pedagogy and in musicology, a rāga is introduced as a child of a mēḷakartā and then in terms of its ārōhaṇa and avarōhaṇa. An excerpt from a song-lyric page follows:
raagam: bEgaDa
29 dheera shankaraabharaNam janya
Aa: S G3 R2 G3 M1 P D2 N2 D2 P S
Av: S N3 D2 P M1 G3 R2 S
Rasikas "in the know" seek to learn which mēḷakartā a rāga belongs to, and attempt to understand the rāga based on this scheme. Unfortunately, the entire exercise is pointless.

So why do you say it is useless?

Inherently, what defines a rāga is not the set of notes but the phrases. The notes used to describe the phrases, let alone the ārōhaṇa/avarōhaṇa, are but notational conveniences. Notice for instance, that Atana is notated with a Ga, but the Ga sung in Atana is but an oscillation between Ri2 and Ma1. Likewise in Darbar, where it's a different oscillation, also between Ri2 and Ma1. The PaDa2Sa phrases from Suddhasaveri or Yadukulakambhoji are identical to the PaNi2Sa phrases from Madhyamavati or Dhanyasi. A classic phrase from Anandabhairavi can be annotated as both PaDa2PaSa or PaNi2PaSa.

The result is a huge disconnect between many classic janya rāgas and their nominal parents. None of Sahana, Khamas, Kambhoji, Natakurinji, Suratti and Mohanam have anything to do with any other, save for the fact that they are classified under Harikambhoji. Likewise, Reetigaula, Bhairavi, Darbarikanada, Hindolam, Suddhadhanyasi are all classified under Natabhairavi, albeit none of them sound like any other. So what use is such a system that emphasises the names of the notes?

To quote musicologist Dr. N Ramanathan, "People exclaim Gajavadana, set in Todi, has so many different kinds of Ga's; that's not the case. How remarkable that various different phrases are all termed Ga! We use a single symbol Ga to identify many of the phrases. … That, I feel, is a very sophisticated (scheme) which in the 1800s or 1700s we (Carnatic music practitioners) have developed. … The word svara itself is redefined. Svara is no longer associated with a pitch – svara is a phrase. We say that Sankarabharanam has 4 kinds of Ma's; Begada has 3 kinds of Ma's. No, we term all those phrases Ma."

Any system that emphasises notational conveniences at the expense of the lakṣaṇa of the rāga is missing the point.

But is there anything inherently wrong with the scheme?

rāgas inherently are not a taxonomy, and trying to fit them into a tree-structure is futile. There are undoubtedly relationships among rāgas: Mukhari, Bhairavi, Huseni and Manji have many common prayōgas. Mukhari though, is related to Suddhamukhari historically, and through it to Kanakambari and Kanakangi. People think Huseni sounds somewhat like Anandabhairavi, which is classified under Kharaharapriya in the mēḷakartā-scheme. Already our taxon is a little unwieldy.

The janya rāga examples above – Arabhi, Purvikalyani, Bhairavi – happen to contain all the saptasvaras. What if the rāga does not? There would be multiple mēḷakartā super-sets of this rāga, so which one do you pick as parent? There are 2 systems in usage:
  • Pick the earlier one: if the janya rāga does not contain Ri, then pick the mēḷakartā with Ri1 rather than Ri2 or Ri3. This arbitrary choice only helps to derail the already tenuous janaka-janya relationship.
  • Pick the mēḷakartā that sounds closest. This choice is also arbitrary, as many janya-rāgas don't sound like any of the candidate parent mēḷakartā rāgas. Madhyamavati can be assigned to Natabhairavi, Kharaharapriya, Charukesi or Harikambhoji on this basis, but sounds like none of them.
Many rāgas, not amenable to being described as a linear progession of notes, are strait-jacketed when fit into an ārōhaṇa/avarōhaṇa scheme. Atana, Suratti, Sindhubhairavi, Purvikalyani, Bhairavi, Kambhoji all include phrases that cannot be fit into a linear scale. Atana & Suratti are especially problematic: no ārōhaṇa/avarōhaṇa written for them cover even a portion of the phrases possible. Finding a mēḷakartā parent is thus futile.

Lastly, bhāṣāṅgarāgas exhibit different problems of classification, as its sometimes unclear which svaras belong in the scale and which are anyasvaras. Kapi, Sindhubhairavi and Brindavani exemplify this problem.

And why is it harmful?

Generations of students has grown up focussing on learning the wrong bases of rāgas, the foundation of music. Generations of rasikas has been cheated out of appreciating the grain of rāgabhāva, by concentrating on the chaff of mēḷakartās. Years of cross-cultural understanding of South Indian classical music by world audiences have been lost on account of trying to marry Indian music ideas to European music concepts of pitches, notes and scales.

OK. What instead?

Pedagogy must focus on learning rāgabhāva through saṅgatis and lakṣaṇa without focussing on ārōhaṇa/avarōhaṇa. And rasikas should be steered clear of trying to enjoy a rāga through learning scales.

Glossary

Term Meaning
anyasvara Exceptional svara, absent in the parent mēḷakartā
apasvara Grave svara error
ārōhaṇa Ascending scale
avarōhaṇa Descending scale
bhāṣāṅgarāga Rāgas with one ore more anyasvaras
bhāva Emotion
janaka Parent
janya Child
kalpitasaṅgīta Precomposed music
lakṣaṇa Grammar
manōdharmasaṅgīta Improvised music
mēḷam Musical scale
mēḷakartā Mēḷam-creator
prayōga Musical phrase, comprising multiple svaras, and sung without pause
rāga Melodic mode
rāgabhāva The bhāvas associated with a rāga
rāgalakṣaṇa The lakṣaṇa associated with a rāga
rasika Connoisseur
sampūrna Complete
saṅgati Prayōga, associated with a song
saptasvara The 7 svaras in an octave
ṣadja The base svara of an octave
svara Ornamented note
svarasthāna Note

References:

  1. Episode 11 of the Sanjay Subrahmanyan show, with Sriram V and Dr. N Ramanathan
  2. Carnatica Archival Centre's Music Appreciation newsletters
  3. karnatik.com