AbstractThis paper investigates the relationship between textuality and mathematics in theSaṅgītaratnākara, a Sanskrit work on music composed in the thirteenth century by Śārṅgadeva. Within the traditional Sanskrit knowledge system on musicology, theSaṅgītaratnākaracan be regarded as a seminal work, given the commentaries it has inspired and the innovative features it contains. I shall explore some textual aspects which, in Medieval India, have contributed to establish the authority of this text and whose significance can be traced in later works. Among these are types of verbalization and mathematical procedures whose role, I shall argue, is entirely theoretical. In theSaṅgītaratnākara, calculations and diagrams underline an innovative language of musical speculation, as well as the relationship between theory and practice and the shaping influence of otherśāstrictraditions. The set of conventions which are based on a vocabulary and methods shared with other technical literatures, particularly prosody and mathematics, attests the variety of literary practices introduced by Śārṅgadeva. I shall argue that this text builds up a code whose aim and function are not necessarily musicological in character. Although orality clearly retains its special status as the archetype of learning, Śārṅgadeva’s contribution manifests the autonomy of literature on saṅgītaas an “art” which constitutes an independent sphere of activity, defining its own rules, and adhering to its own criteria of value.