Audio track attachments

Apr 5, 2014  

What’s a music site without actual sound on it, right? Now, folks with editing rights on Patantara can add audio attachments to the documents they create. I describe how to do that in this post using the canonical Ganarajena Raksitoham example.

Adding an audio attachment to a document

Step 1

Drag and drop one or more mp3 audio files to the left hand side of the editor view - where you type the text that makes up the notation documents on Patantara.

The files will be given symbolic labels based on their file names and will begin uploading as soon as you drop them on to the editor. They will all be added at the end of the document and you’ll notice a progress bar being shown above the line specifying each attachment, as it is uploaded.

Step 2

Though you need to wait for the files to be uploaded in order to view them on the document’s page, you can begin incorporating the audio tracks into your document as soon as the file has been assigned an audio-track:// URL at the bottom of the document.

For example, the Ganarajena Raksitoham document has the following four attachment specification lines at the bottom -

[01 Ganarajena-Recite]: audio-track://w4TCpT...kQtCw "01 Ganarajena-Recite.mp3"
[03 Ganarajena-Singing]: audio-track://w4TCp...RT_CqcOl "03 Ganarajena-Singing.mp3"
[04 Ganarajena-Vina]: audio-track://w4TCp...owq1R "04 Ganarajena-Vina.mp3"
[02 Ganarajena-Svara]: audio-track://w4TC...jDjEA7 "02 Ganarajena-Svara.mp3"

Each line stands for one audio file attachment and is identified by the label indicated between [] at the start of each line. So the four labels we can use in our document are -

[01 Ganarajena-Recite]
[03 Ganarajena-Singing]
[04 Ganarajena-Vina]
[02 Ganarajena-Svara]

These labels can be used like normal Markdown links in the document. So to place an audio file and some descriptive text associated with it, just use Markdown’s link syntax. For example, to say that the “01 Ganarajena-Recite” is a recording of a recitation of the text of the composition, you can write something like this -

[Text recitation][01 Ganarajena-Recite]

.. and the patantara renderer will notice that it is referring to an audio attachment and present appropriate controls for playing it back. You’ll see this on the page -

Text recitation

The label string is initially chosen to be the file name without its extension, but the label can be anything. So you can type in a short name like “recite” instead of the full “01 Ganarajena-Recite”.


The current implementation is simplistic and just serves to associate audio recordings with documents. Have a recording of a different patantara rendition of a song? Just “fork” the notation document (a button in the editor) and add in the recordings of your patantara!

In the future, we’ll be adding support to associate the notation with parts of the recording so that the recording can be navigated for listening and practice.