भातखंडे + Unicode = ?

The Idea

I’ve been meaning to try to represent the Bhatkhande method notation of Indian music using unicode for a while now, and I’ve finally gotten down to it. The advantages of being able to do so are too many to write about. Essentially, if we could accomplish this, we would have a platform-independent, universal way of representing typable, searchable, copy-paste-able, email-able Indian notation in plain text! I’m salivating already!

How to do this? Here are my initial ideas and the problems I’ve identified. More inputs, suggestions, help please.

What we have so far

Most symbols in the Bhatkhande system of notation have have been borrowed from the Devanagari character set. The good Pandit, clearly, was a proponent of code-reuse, even in his day! He was obviously too busy doing everything he did to be reinventing wheels. So the unicode counterparts for many glyphs are already there, waiting to be used:

  • The horizontal line placed under the note to represent a कोमल स्वर is the stress sign अनुदात्त (character code 0952)
    • Unicode representation:   ॒ . Eg: ग॒
  • The glyph used to represent a तीव्र स्वर (as in तीव्र मधयम) is the stress sign उदात्त (character code 0951)
    • Unicode representation:  ॑ . Eg: म॑
  • The dot above the स्वर that represents the तार साप्तक is obviously the अनुस्वार (character code0902).
    • Unicode representation: ं . Eg: पं
  • The dot under the note that represents the मंद्र सप्तक seems to be the नुक्ता (character code 093C). As can be seen from the example below, the नुक्ता gets subscripted to the right of the स्वर instead of directly below it.
    • Unicode representation:  ़ Eg: ध़
    • But the नुक्ता presents a problem when representing the निशाद. At least on my mac, following the ी with a नुक्ता replaces them both with a ी़ ! I’m not sure why this is. So we end up with a नी़ instead of a मंद्र निशाद. Is anyone aware of another glyph in the unicode Devanagri character set that could be used here for representing the मंद्र सप्तक ? Or from any the unicode character set of any other language for that matter?
    • Temporary solution until we find a better one: add a space between the नी and the नुक्ता. So:
    • Eg: नी ़
  • Parenthesis are obviously already there. Eg: (प) = धपमप
  • Commas for divisions of a मात्रा are, again, there.
  • The अवग्रह चिन्ह to denote the continuation of the vowel of the last syllable if the lyric – ऽ – is there too.
  • The hyphen ( – ) used to denote the continuation of a note is, of course, universal.
  • सम : use the roman lowercase x.
  • खाली : use the roman lowercase o.
  • खंड : Ideally, we want tall vertical bars that span both lines – the notation line and the lyric line. But a decent solution would be to use the पूर्णविराम on both lines: ।
  • Kumarji’s symbol for silence is a circle. We have the zero. Eg: ०

Now with this much, we already have a basic system in place. So, for instance, a simple अारोह in मारवा can be written thusly:

नी ़ रे॒ ग म॑ ध नीं रे, सां ।

Not bad, eh?

Problems and Solutions

But this is where the problems begin (with interim solutions I could think of – comments please!) :

  • कणस्वर : As far as I know, unicode does not provide a way to have superscript characters. Being able to superscript the स्वर to the left of the main स्वर would be the ideal way to represent a कणस्वर. How to do this?
    • Interim Solution: Use an arrow. Eg: मिया मल्हार’s कोमल गंधार :  म>ग॒
  • मींड : Toughie. Bhatkhandeji uses an inverted अर्धचंद्र or a curve drawn above the the notation line, between two notes to represent a मींड. No clear way to do this.
    • Interim Solution: Use curly brackets. Eg: तिलक कामोद’s मींड : {सां प}
    • Note: We can’t use regular parenthesis here because they’ve already been used. (प) = धपमप
  • A single मात्रा : Another toughie. Bhatkhandeji uses an अर्धचंद्र or a curve drawn below the the notation line encapsulating a number of notes to suggest that they all occupy the space of a single मात्रा. Again, no clear way to do this.
    • Interim Solution: Use square brackets. So [नी ़, रे, ग, रे] represents the notes occupying a single मात्रा divided into four लघूs. (Or should I say four द्रुतs?)
  • Alignment: We’d obviously have to abuse the spacebar quite a bit when aligning the lyric line with the notation line, but it ought to be worth it. Monospace fonts, perhaps?

भातखंडे + Unicode Beta 0.1

Here, as a first example, is the स्थाई of कुमारजी’s बड़ा ख्य़ाल in तोड़ी, विलंबित झूमरा :

- - [नी ़ - ध़ -] [- नी ़ रे॒ रे॒ ]  | [ग॒ रे॒ - -] [- - ० ०] [ध़॒ रे॒, -, -, -]
ऽ ऽ   ध्या ऽ  ऽ  ऽ   ऽ  न  ऽ म    |  ना ऽ ऽ ऽ    ऽ ऽ ० ०    र ऽ,  ऽ, ऽ, ऽ |
     ३                           x

[सा - - -] [ध़॒नी ़, -, ध़॒, -] [ध़॒सा, -, -, नी ़] [ रे॒ - सा - ] |
 हूं  ऽ ऽ ऽ    रे ऽ ,  ऽ, ऽ,  ऽ    ऽ ऽ , ऽ, ऽ, ऽ       ऽ ऽ  ऽ ऽ    |
 २

[ध़॒प, म़॑, -, -] [ - - ध़॒ -] [नी ़ - ध़॒ - ] |
 तोऽ, ऽ , ऽ,  ऽ    ऽ ऽ  र ऽ    ही   ऽ ऽ ऽ    |
 ०

[सा - - -] [सा - - -] [नी ़ - ध़॒ -] [नी ़ - रे॒ - ] | [रे॒ - - -] [- - ग॒ ग॒] [रे॒ - - सा] |
 रू ऽ  ऽ ऽ    प ऽ  ऽ ऽ   तो   ऽ ऽ  ऽ    र   ऽ ही ऽ  |   क ऽ ऽ ऽ    ऽ ऽ र ऽ   म ऽ  ऽ ऽ   |
 ३                                                x

[सा - - -] [रे॒ - ग॒ -] [म॑, -, ध॒नी, -] [ध॒ - - -] |
 तो ऽ ऽ ऽ    र ऽ ही ऽ   ना, ऽ, ऽऽ,   ऽ   म ऽ ऽ  ऽ  |
 २

[ध॒म॑, म॑रे॒, -, -] [ग॒ग॒, -, रे॒, -] [सा - नी -] |
 लेऽ,  ऽऽ, ऽ,  ऽ   तऽ, ऽ, र,  ऽ   त ऽ  ऽ ऽ   |
 ०

[सा - -रे॒] [रे॒ग॒, -, रे॒, सा] [नी ़ - ध़॒ -] [- नी ़ रे॒ रे॒ ] |
 ला ऽ ऽ गी  रेऽ, ऽ,  ऽ, ऽ    ध्या  ऽ ऽ  ऽ    ऽ न ऽ म     |
 ३

Whew!

To-dos, ideas, ruminations

  • That took a lot of typing! We need to develop an app where each note is assigned a key and maybe pressing shift gives us a कोमल स्वर – something that’ll eliminate the need to type each symbol separately like I had to.
  • The ideal way to implement this would be to use a technique like the one described above to encode notation in plain text and then use a parser of some sort to convert this into a pdf that uses the standard अर्धचंद्रs and superscripted कणस्वर symbols etc to create a completely conventional notated composition. Maybe something on the lines of a markdown -> html conversion perhaps? Writing a parser like this is beyond me, so – calling all the ख्य़ालियाs with coding skills out there – please help!
  • Unicode ninjas – can you think of a better approach to the कणस्वरs and अर्धचंद्रs ? Maybe characters that exist in unicode character sets for other languages? If we could do this entirely in unicode, without having to parse the plain text files and turn them into pdfs – that would just be fantastic!

The floor is yours.
Help.