An Aalapanai is an improvisation in the same raga as the song. The Aalaapanai has a formal structure, similar to the Pallavi - Anupallavi scheme. It includes movements in all the three sthaayis as the raga allows. Sthaayi is the octave or register of the swaras. The normal or middle sthaayi is termed Madhya sthaayi, the upper octave is Thaara sthaayi, the lower octave is Mandhara sthaayi.
Similar names exist for further octaves.
An Aalaapanai generally starts in the Madhya sthaayi, proceeds upward into the Thaara sthaayi and then downward to the Mandhara sthaayi before returning to end in the Madhya sthaayi. This structure is modified for ragas which are better exposed otherwise. For example, Aalaapanais in the raga Ataana are often started in Thaara sthaayi. Depending on the raga and the imagination and skills of the performer, an Aalaapanai can take up from a few minutes to a half hour or more. In folklore, there are stories of great performers who have rendered Aalaapanai for a week, without any significant repetition of the raga phrases used.