PureTones Sequencer

PureTones Sequencer is a digital musical composer for Indian Classical music. It uses a simple grammar to describe an Indian Classical music composition and then generates a Faust DSP (Digital Signal Processing) code. Faust is a functional programming language for sound synthesis and audio processing. The generated Faust code can be played by pasting the code in the online Faust Editor.

PureTones Sequencer is meant to be used in conjunction with PureTones Drone and PureTones Musical Scale. To understand how a Tanpura and a musical scale can be tuned to each other, please read this article which illustrates the role of the Tanpura in Indian Classical music.

PureTones Sequencer Webapp

To sequence musical phrases, motifs and compositions in Indian Classical music, check out the PureTones Sequencer Webapp. It has been built using faust2webaudio. Here is a quick user guide.

  1. Select your pitch using the Key, Octave and Cents settings.
  2. For each of the notes, Sa, re, Re,..., use the Cents and 0.01 ¢ to finetune the pitch of each note.
  3. If you saved a keyboard tuning using the Save Session dialog from the PureTones Musical Scale Webapp, you can load that tuning into the sequencer using the Upload Keyboard Tuning button.
  4. Type your composition in the textbox indicated. For details about the grammar, see the documentation below.
  5. Use the Play Audio and Download Faust File buttons to play the audio and to generate the Faust DSP code and download it.
  6. The Faust DSP code you download can also be played using the online Faust Editor.
  7. You are at liberty to use the Faust DSP code to create musical works and use them as you like. We would be grateful if you acknowledge and credit PureTones by linking to this website.


PureTones Sequencer uses a simple grammar to write compositions using notation from Indian Classical music as specified below:

    <motif> = <note> + ' ' + <motif>
    <note> = <identifier> + ' ' <timing>
    <identifier> = <name> + <octave> + <shake>
    <name> = Sa | re | Re | ga | Ga | ma | Ma | Pa | dha | Dha | ni | Ni
    <octave> = null | " | '
    <shake> = null | '(G)' | '(G)(<start>, <end>, <rate>, <times>)'
    <timing> = null | <jati> + <repeats>
    <jati> = null | . | ; | ,
    <repeats> = null | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
    <start> = number
    <end> = number
    <rate> = number
    <times> = number
  1. A motif refers to a musical composition. It is a sequence of note's separated by whitespaces.
  2. A note is a pair of an identifier and a timing separated by whitespace.
  3. An identifier is a triplet of name, octave and shake without any separators.
  4. A name could be any one of 12 notes from an octave denoted as follows Sa re Re ga Ga ma Ma Pa dha Dha ni Ni where notes beginning with a lowercase are Komal (flat) notes and those beginning with an uppercase are Tivra (sharp) notes. Of course, Sa and Pa are always capitalized.
  5. An octave specification is optional. There are three Saptaks (octaves): Mandra (low), Madhya (middle) and Tara (high). A " denotes Tara Saptak, a ' denotes Mandra Saptak and no octave specification means Madhya Saptak.
  6. A shake denotes whether or not the note is shaken or rendered with a Gamaka. A shake specification is optional. It is denoted by (G) to mean a note with Gamaka or not specified to mean an unmodulated note. It can also be specified with additional parameters like (G)(start, end, rate, times) where start is the starting pitch in cents with respect to the present note, end is the ending pitch in cents, rate is the rate of the shake, and times is the number of times for which the shake is to be repeated(including fractional numbers).
  7. A timing is a pair of jati and repeats without any separators. It is an optional specification. If a timing specification is not provided, it means the note specified in the previous token is a whole note (or has a duration of 1 period).
  8. A jati denotes a subdivision of a period. It is an optional specification. A . denotes a 1/2 note, a ; a 1/4 note and a , a 1/8 note. If jati is omitted, it denotes a whole note.
  9. A repeats specification determines the factor by which a note duration derived from its jati is extended. It is an optional specification. It can take any numerical value from 1 to 8. If a repeats specification is omitted, it means a default value of 1.
  10. As an example, a timing specification of .3 denotes a note of duration 3 1/2 notes, since the jati is 1/2 note and the repeats is 3. As another example, a timing specification of 2 denotes a note of duration 2 whole notes, and a timing specification of ; denotes a note of duration of a 1/4 note.
  11. Each of the parameters start, end, rate and times is specified as a number.

Example Motif

Here is an example motif composed using the grammar specified above.

    ni' Sa Ga ma dha(G) ni dha(G) Pa(G) 2
    ma Pa(G) Pa .3 ma .3 Ga 2 Ga ma Ga 2 Re Sa 4
    ma' dha' ni'(G) 2 Sa Ga ma dha ni(G) 2 ni Sa" 4
    ni Sa" Ga" ma" Ga" Re" Sa" 4
    ni Sa" dha(G) Pa .3 ma Pa(G) 2 Pa ma Ga 2
    Ga ma Ga 2 Re 2 Sa 4
    dha' ni' Sa 8

Here is another example showing the use of the full specification for a gamaka using the syntax of (G)(start, end, rate, times).

    Sa ma ga(G)(0,203.91,1.5,0.9) ma Dha(G)(0,111.73,1.5,0.9) ma Pa ;1 ga(G) Re Sa 2
    ni'(G)(-30,30,5,2.95) Sa Re(G)(0,-182.4,1.5,0.9) 2 Sa ni' Dha'(G) 2
    ma' Dha'(G)(0,-182.4,1.5,0.9) 2 Dha' ni'(G) Sa 2

Fine Tune Adjustments

The generated code uses the Venkatamakhin-Ramamatya tuning system (for details, refer to this article.) to generate the ratios representing each note. If these ratios are not right for you, you can use the fine tune adjustments to microtonally adjust the pitch of each note in your scale up to a resolution of 0.01 cents. The values you fill in for the fine tune adjustments are incorporated in the generated code.

If you are interested in learning more about the PureTones project, you can reach us at puretones@sadharani.com.

Get in Touch