A musician write a tune in 'laalaala' fashion and the lyricist can write the words for that. Essentially, I hypothesis that process of writing a song based on a tune is quite similar to writing a slokam based on a vrutham.
Basic units to represent a tune:
The primitives are more sophisticated since the needs of a tune need to be more precise. The transliterated way (alphabetic) of writing the syllables is easier for this process; so I adopt that.
l: short consonant. Ex: k, s
ll: conjunct consonant. Ex: ksh
a: short vowel.
aa: limited elongation for two mathras.
aa..: unlimited elongation. Elongate as musician wishes. The '..' is the usual regular expression '+' meaning. That is, aa is an instance of aa..; aaa.. can be reduced to aa.. etc.
Mapping from aksharams:
Short vowels like 'a', 'i', 'u' etc map to 'la'
Long vowels like 'aa', 'ee', 'oo' etc map to 'laa..'
Short vowel signs like 'a', 'i', 'u' etc map to 'a'
Long vowel signs like 'aa', 'ee', 'oo' etc map to 'aa..'
'au', 'ai' and samvruthokaram maps to 'a..'
Conjunct consonants like 'ksh' can map to 'll' or 'al'
Chillu or Anuswaram which can map to either 'l' or 'a..'.
A reasonably simple program can use these mappings and give correct clues to the lyricist what to write at a position and also verify what he has already written.
la lla la la p laa.. laa.. laa laa
po nmu ra Li oo thum kaa ttil
പൊ ൻമു ര ളി ഊ തും കാ റ്റിൽ